Bonusway design system

Forms

Select

The native select, styled. Its whole props type is `SelectHTMLAttributes` — nothing is added, because a native select gets the platform picker on a phone and that is better than anything we would build.

import Select from '@/components/ui/Select';

Source: src/components/ui/Select.tsx

Examples

A native select

Props

<Select> props

PropTypeDefaultDescription
size'sm' | 'md''md'—

Also accepts everything in Omit<SelectHTMLAttributes<HTMLSelectElement>, 'size'> — so native attributes (id, onClick, aria-*, data-*) pass straight through.

Usage

Do

  • Prefer it over Dropdown whenever you only need to pick one of a short list.

Don’t

  • Don’t reach for Dropdown just because it looks more designed — you lose the native mobile picker.

Tämä verkkosivusto käyttää evästeitä

Käytämme evästeitä parantaaksemme käyttökokemustasi sivustollamme ja mukauttaaksemme sinulle tarjoamaamme sisältöä. Tärkeät evästeet ovat välttämättömiä jotta palvelumme toimii oikein. Jos suostut siihen, että keräämme tietoja sinusta käyttämällä välttämättömiä evästeitä ja markkinointievästeitä, valitse "Hyväksy kaikki". Voit aina muuttaa valintaasi evästeasetuksista.

Evästeasetukset