Base

  • Colors
  • Icons
  • Logos
  • Shadows and Elevations
  • Spacing
  • Typography

Components

  • Accordion
  • Avatars
  • Badges
  • Buttons
  • Cards
  • Character Counter
  • Device Type Icons
  • Draggables
  • Dropdowns
  • Droppables
  • Expandable image
  • Filters
  • Gallery card
  • Icon Button
  • Indicators
  • Lightbox image
  • Lists
  • Loading
  • Messages
  • Pictogram
  • Poster Play
  • Progress bar
  • QR Code
  • Rating stars
  • Row Selector
  • Segmented Controls
  • Sentiment
  • Split View
  • Tables
  • Tags
  • Tester vitals
  • Toggle button
  • Typeahead

Form

  • Checkbox
  • Combobox
  • Form Rule
  • Hint
  • Input
  • Input Title
  • Label
  • Multi-select List
  • Search
  • Select
  • Single-select List
  • Sliders
  • Switch
  • Text Area

Layout

  • Containers
  • Layers
  • Layout
  • Split Layout
  • Wrappers

Navigation

  • Context Switcher
  • Nav bar
  • Navigation
  • Pagination
  • Sidebar Navigation
  • Step Navigation
  • Tabs

Overlay

  • Banners
  • Bulk Selector
  • Modals
  • Popovers
  • Toast
  • Tooltips
  • User Notifications

Patterns

  • Full Page Message
  • Question card & Group Questions Container

Visualizations

  • Data Colors

Search

This component is still in Beta. Please reach out to Design System team before using it.

Search

Recent Searches Clear recent analytics Tests New concept workflow Updated concept [WorkspaceName] > Updated concept > Note: third concept was preferred UX Research - Dashboard Concept Concept Information Architecture Drafts Concept validation Customer environment and concepts Highlight reels New customers like the report concept Customer mental models & concepts aren’t consistent across personas
Expand Copy
<!-- for demo only -->
<tk-highlight id="exampleSearchOutput"
></tk-highlight>

<tk-search
  id="exampleSearch"
  placeholder="Search"
  full-width="false"
>
  <tk-search-overlay id="exampleSearchOverlay" slot="search-overlay">
    <tk-search-overlay-section>
      <span slot="header">Recent Searches</span>
      <tk-button
        alignment="trailing"
        slot="header-action"
        size="compact"
        type="ghost"
        id="clearRecentBtn"
      >
        Clear recent
      </tk-button>
      <tk-search-overlay-item icon="search">
        analytics
      </tk-search-overlay-item>
    </tk-search-overlay-section>
    <tk-search-overlay-section>
      <span slot="header">Tests</span>
      <tk-search-overlay-item url="https://www.usertesting.com/" icon="record">
        New <strong>concept</strong> workflow
      </tk-search-overlay-item>
      <tk-search-overlay-item url="https://www.usertesting.com/" icon="unmoderated">
        Updated <strong>concept</strong>
      </tk-search-overlay-item>
      <tk-search-overlay-item url="https://www.usertesting.com/" icon="unmoderated">
        [WorkspaceName] > Updated <strong>concept</strong>  >  Note: third concept was preferred
      </tk-search-overlay-item>
      <tk-search-overlay-item url="https://www.usertesting.com/" icon="record">
        UX Research - Dashboard <strong>Concept</strong>
      </tk-search-overlay-item>
      <tk-search-overlay-item url="https://www.usertesting.com/" icon="unmoderated">
        <strong>Concept</strong> Information Architecture
      </tk-search-overlay-item>
    </tk-search-overlay-section>
    <tk-search-overlay-section>
      <span slot="header">Drafts</span>
      <tk-search-overlay-item url="https://www.usertesting.com/" icon="document">
        <strong>Concept</strong> validation
      </tk-search-overlay-item>
      <tk-search-overlay-item url="https://www.usertesting.com/" icon="document">
        Customer environment and <strong>concept</strong>s
      </tk-search-overlay-item>
    </tk-search-overlay-section>
    <tk-search-overlay-section>
      <span slot="header">Highlight reels</span>
      <tk-search-overlay-item url="https://www.usertesting.com/" icon="highlight-reel">
        New customers like the report <strong>concept</strong>
      </tk-search-overlay-item>
      <tk-search-overlay-item url="https://www.usertesting.com/" icon="highlight-reel">
        Customer mental models &amp; <strong>concept</strong>s aren’t consistent across personas
      </tk-search-overlay-item>
    </tk-search-overlay-section>
  </tk-search-overlay>
</tk-search>

<script>
  const displayInputSearchEventChange = (outputElement, amount) => {
    outputElement.innerText = `📣 valueChanged emitted: ${amount}`;
  }

  const clearRecent = () => {
    const recentSearches = document.querySelector('tk-search-overlay-section:nth-child(1)');
    if (recentSearches) {
      recentSearches.remove();
    }
  }

  const hideSearchOverlay = () => {
    exampleSearchOverlay.removeAttribute('is-visible');
  }

  exampleSearch.addEventListener('valueChanged', ($event) => {
    displayInputSearchEventChange(exampleSearchOutput, $event.detail);
    if ($event.detail === null || !$event.detail.length) {
      hideSearchOverlay();
    }
  });

  exampleSearch.addEventListener('submitEvent', ($event) => {
    exampleSearch.setAttribute("full-width", true);
  });

  exampleSearch.addEventListener('expanded', ($event) => exampleSearchOverlay.setAttribute('is-visible', 'true'));
  exampleSearch.addEventListener('close', ($event) => hideSearchOverlay());
  clearRecentBtn.addEventListener('click', ($event) => clearRecent());
</script>

Description

The search input component is a control that allows the user to quickly look for content within our application.

tk-search

Properties

Property Attribute Description Type Default
disabled disabled Displays the search in a disabled style. boolean false
fullWidth full-width boolean false
placeholder placeholder Optional text to show when the input is empty. Should not be used in place of a label. string undefined
value value Optional text to prefill the textfield with string ""

Events

Event Description Type
close Fires when search becomes deactivated CustomEvent<any>
expanded Fires when search becomes activated CustomEvent<any>
togglerIsOnClose CustomEvent<any>
togglerIsOnSearch CustomEvent<any>
valueChanged CustomEvent<string>

Slots

Slot Description
"search-overlay" The overlay that contains the markup with search results