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.

Denna webbplats använder cookies.

Vi använder cookies för att förbättra din upplevelse på vår webbplats och anpassa innehållet vi tillhandahåller dig. Viktiga cookies är nödvändiga för att vår tjänst ska fungera korrekt. Om du går med på att vi samlar in information om dig genom användningen av nödvändiga och marknadsförande cookies, välj "Acceptera alla". Du kan alltid ändra dina preferenser genom att besöka Cookie -inställningar.

Cookie -inställningar