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

Icon Button

The icon button is used to trigger a secondary action when we want to reduced visual noise.

This component is only available in the userTestingNext theme.

Defaults

Copy
  <tk-icon-button
    size="medium"
    status="ready"
    type="contained"
    variant="standard"
    round="false"
  >
    <tk-icon name="close"></tk-icon>
  </tk-icon-button>

Description

The icon you wish to use as a button is slotted inside of tk-icon-button.

Size

Expand Copy
  <tk-icon-button size="xs">
    <tk-icon size="xs" name="close"></tk-icon>
  </tk-icon-button>
  <tk-icon-button size="small">
    <tk-icon size="small" name="close"></tk-icon>
  </tk-icon-button>
  <tk-icon-button size="compact">
    <tk-icon name="close"></tk-icon>
  </tk-icon-button>
  <tk-icon-button size="medium">
    <tk-icon name="close"></tk-icon>
  </tk-icon-button>
  <tk-icon-button size="large">
    <tk-icon name="close"></tk-icon>
  </tk-icon-button>

Description

Pass the size prop to control the size of the button. medium is the default.

Type

Expand Copy
  <tk-icon-button>
    <tk-icon name="close"></tk-icon>
  </tk-icon-button>
  <tk-icon-button type="outline">
    <tk-icon name="close"></tk-icon>
  </tk-icon-button>
  <tk-icon-button type="ghost">
    <tk-icon name="close"></tk-icon>
  </tk-icon-button>

Description

Pass the type prop to control the type of button. contained is the default.

Variant

Expand Copy
  <tk-icon-button variant="standard">
    <tk-icon name="close"></tk-icon>
  </tk-icon-button>
  <tk-icon-button variant="destructive">
    <tk-icon name="close"></tk-icon>
  </tk-icon-button>

Description

Pass the variant prop to control the variant of the button. standard is the default.

Status: disabled

Expand Copy
  <tk-icon-button status="disabled">
    <tk-icon name="close"></tk-icon>
  </tk-icon-button>
  <tk-icon-button status="disabled" type="outline">
    <tk-icon name="close"></tk-icon>
  </tk-icon-button>
  <tk-icon-button status="disabled" type="ghost">
    <tk-icon name="close"></tk-icon>
  </tk-icon-button>
  <tk-icon-button status="disabled" variant="destructive">
    <tk-icon name="close"></tk-icon>
  </tk-icon-button>

Description

Pass the status prop to indicate whether it’s ready, active, or disabled. The default is ready.

Status: active

Expand Copy
  <tk-icon-button status="active">
    <tk-icon name="close"></tk-icon>
  </tk-icon-button>
  <tk-icon-button status="active" type="outline">
    <tk-icon name="close"></tk-icon>
  </tk-icon-button>
  <tk-icon-button status="active" type="ghost">
    <tk-icon name="close"></tk-icon>
  </tk-icon-button>
  <tk-icon-button status="active" variant="destructive">
    <tk-icon name="close"></tk-icon>
  </tk-icon-button>

Description

Pass the status prop to indicate whether it’s ready, active, or disabled. The default is ready.

Round

Expand Copy
  <tk-icon-button round>
    <tk-icon name="close"></tk-icon>
  </tk-icon-button>
  <tk-icon-button variant="destructive" round>
    <tk-icon name="close"></tk-icon>
  </tk-icon-button>

Description

Pass the round boolean prop to render a round button.

Colors



Expand Copy
<div style="display: flex; background: var(--neutral-grey-800); padding: var(--s-50);">
  <tk-icon-button type="ghost" color="neutral">
    <tk-icon name="close"></tk-icon>
  </tk-icon-button>
  <tk-icon-button type="ghost" color="neutral" round>
    <tk-icon name="close"></tk-icon>
  </tk-icon-button>
</div>

<hr class="horizontal-rule">

<div style="display: flex;">
  <tk-icon-button type="ghost" color="blue">
    <tk-icon name="close"></tk-icon>
  </tk-icon-button>

  <tk-icon-button type="ghost" color="green">
    <tk-icon name="close"></tk-icon>
  </tk-icon-button>

  <tk-icon-button type="ghost" color="yellow">
    <tk-icon name="close"></tk-icon>
  </tk-icon-button>

  <tk-icon-button type="ghost" color="red">
    <tk-icon name="close"></tk-icon>
  </tk-icon-button>

  <tk-icon-button type="ghost" color="aqua">
    <tk-icon name="close"></tk-icon>
  </tk-icon-button>

  <tk-icon-button type="ghost" color="teal">
    <tk-icon name="close"></tk-icon>
  </tk-icon-button>

  <tk-icon-button type="ghost" color="orange">
    <tk-icon name="close"></tk-icon>
  </tk-icon-button>

  <tk-icon-button type="ghost" color="pink">
    <tk-icon name="close"></tk-icon>
  </tk-icon-button>

  <tk-icon-button type="ghost" color="purple">
    <tk-icon name="close"></tk-icon>
  </tk-icon-button>

  <tk-icon-button type="ghost" color="grey">
    <tk-icon name="close"></tk-icon>
  </tk-icon-button>
</div>

<hr class="horizontal-rule">

<div style="display: flex;">
  <tk-icon-button type="ghost" color="blue" round>
    <tk-icon name="close"></tk-icon>
  </tk-icon-button>

  <tk-icon-button type="ghost" color="green" round>
    <tk-icon name="close"></tk-icon>
  </tk-icon-button>

  <tk-icon-button type="ghost" color="yellow" round>
    <tk-icon name="close"></tk-icon>
  </tk-icon-button>

  <tk-icon-button type="ghost" color="red" round>
    <tk-icon name="close"></tk-icon>
  </tk-icon-button>

  <tk-icon-button type="ghost" color="aqua" round>
    <tk-icon name="close"></tk-icon>
  </tk-icon-button>

  <tk-icon-button type="ghost" color="teal" round>
    <tk-icon name="close"></tk-icon>
  </tk-icon-button>

  <tk-icon-button type="ghost" color="orange" round>
    <tk-icon name="close"></tk-icon>
  </tk-icon-button>

  <tk-icon-button type="ghost" color="pink" round>
    <tk-icon name="close"></tk-icon>
  </tk-icon-button>

  <tk-icon-button type="ghost" color="purple" round>
    <tk-icon name="close"></tk-icon>
  </tk-icon-button>

  <tk-icon-button type="ghost" color="grey" round>
    <tk-icon name="close"></tk-icon>
  </tk-icon-button>
</div>

Description

Pass the round boolean prop to render a round button.

tk-icon-button

Properties

Property Attribute Description Type Default
color color Pass the color prop to render the corresponding color on the button. Only works for buttons with type="ghost" "aqua" | "blue" | "green" | "grey" | "neutral" | "orange" | "pink" | "purple" | "red" | "teal" | "yellow" undefined
label label Pass the label prop to render an aria-label on the button. string undefined
round round Pass the round boolean prop to render a round button. boolean false
size size Pass the size prop to control the size of the button. "compact" | "large" | "medium" | "small" | "xs" 'medium'
status status Pass the status prop to indicate whether the button is active (“on”), ready (“rest”), or disabled. "active" | "disabled" | "ready" 'ready'
type type Pass the type prop to control the type of button. "contained" | "ghost" | "outline" 'contained'
variant variant Pass the variant prop to control the variant of the button. "destructive" | "standard" 'standard'