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.

Deze website maakt gebruik van cookies

We gebruiken cookies om de ervaring van onze website te verbeteren alsook de content die we jou geven. Essentiële cookies zijn noodzakelijk om onze dienst correct te laten functioneren. Indien je akkoord gaat dat we persoonlijke informatie verzamelen door middel van essentiële en marketing cookies, selecteer dan ´Aanvaard alle cookies´. Je kan jouw keuze steeds wijzigen bij de Cookie Settings.

Cookie settings