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.

Acest site folosește cookie-uri

Folosim cookie-uri pentru a îmbunătăți experiența pe site-ul nostru și a personaliza conținutul pe care ți-l oferim. Cookie-urile esențiale sunt necesare pentru ca serviciul nostru să funcționeze corect. Dacă ești fericit cu colectarea de informații despre tine prin utilizarea cookie-urilor esențiale și de marketing, atunci „Acceptă toate cookie-urile”. Poți oricând să îți schimbi preferința accesând Setările Cookie.

Setări cookie