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

  • Card Select
  • 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

Segmented Controls

Use segment controls for mutually exclusive selections that directly controls another component.

This component is deprecated! Please use the new Segmented Controls instead.

Setting options

Expand Copy
<tk-segmented-controls options="options">
</tk-segmented-controls>

Description

Pass the component an options prop to render the controls. The properties section at the bottom of this page describes the expected data model.

Size: small

Expand Copy
<tk-segmented-controls options="options" size="small">
</tk-segmented-controls>

Size: large

Expand Copy
<tk-segmented-controls options="options" size="large">
</tk-segmented-controls>

Disabling an option

Expand Copy
<tk-segmented-controls options="options">
</tk-segmented-controls>

Description

To disable an option, set the disabled key of the option object to true.

Completely disabled

Expand Copy
<tk-segmented-controls options="options">
</tk-segmented-controls>

Description

To disable all options, set the disabled key of every option object to true.

Listening for selection

Expand Copy
<!-- for demo purposes only -->

<tk-highlight id="exampleSegmentedControlsOutput" class="l-block"></tk-highlight>

<tk-segmented-controls options="options">
</tk-segmented-controls>

Description

Upon selecting a control, the controlSelect event is emitted. It contain a detail property equal to the value of the clicked option.

Prefilled value

Expand Copy
<tk-segmented-controls options="options" selected="monthly">
</tk-segmented-controls>

Description

Pass the component a selected prop which matches the value of the option that you’d like prefilled.

Fill container

Expand Copy
<tk-segmented-controls options="options" fill-container>
</tk-segmented-controls>

Description

By default, options are as wide as their content. To have them grow to the width of their container, set fill-container.

Using icons




Expand Copy
<tk-segmented-controls options="options" size="small">
</tk-segmented-controls>

<hr>
<tk-segmented-controls options="options">
</tk-segmented-controls>
<hr>
<tk-segmented-controls options="options" size="large">
</tk-segmented-controls>
<hr>
<tk-segmented-controls options="options" fill-container="true">
</tk-segmented-controls>

Color variants

Expand Copy
<div>
  <tk-segmented-controls variant="blue-50" options="options"></tk-segmented-controls>
</div>
<div>
  <tk-segmented-controls variant="blue-100" options="options"></tk-segmented-controls>
</div>

Description

There’s a total of 3 different color variations for this component. grey-50 is the default.