Components Forms

Select

A drop-down: a native select drawn as Tessera’s control, for the platform’s popup and accessibility.

import { Select } from '@kition/tessera-ui'
Playground

Props

What is shown
import { Select } from '@kition/tessera-ui'

<Select
  size="md"
>
  {['Normal', 'Multiply', 'Screen', 'Overlay'].map((mode) => <option key={mode}>{mode}</option>)}
</Select>

When not to

  • Two or three options always visible: use Segmented or Choice.

Examples

Sizes
select.tsx
import { Select } from '@kition/tessera-ui'

export default function Demo() {
  return (
    <div className="demo-stack">
      <Select defaultValue="sheet" aria-label="Kit">
        <option value="sheet">Sheet</option>
        <option value="slide">Slide</option>
        <option value="photo">Photo</option>
      </Select>
      <Select size="lg" defaultValue="slide" aria-label="Kit (large)">
        <option value="sheet">Sheet</option>
        <option value="slide">Slide</option>
      </Select>
    </div>
  )
}

Props

Select

A drop-down. It stays a native select, as kits' do, for the platform's popup and accessibility, drawn as Tessera's control. Children are <option>s.

PropTypeDefaultDescription
sizeControlSize'sm'
invalidboolean—

Also takes the attributes of its HTML element (`className`, `aria-*`, events…).

Used in

1 of Kition's 16 kits use this component.

  • Table