Select component
Loading demo: select-real-world
npx sdaia-ui@latest add select
import { Select } from '@/components/ui/Select';<Select size="large" placeholder="Select user" options={[{ value: 'ali', label: 'Ali' }]} onChange={(value) => console.log(value)} />Standard select input in the default placeholder state.
Loading demo: select-default
Select with a leading icon inside the input field.
Loading demo: select-icon
Select with a colour dot indicator as the leading item.
Loading demo: select-dot
Select input available in Large and Medium sizes.
Loading demo: select-sizes
Select in the disabled state, preventing user interaction.
Loading demo: select-disabled
Props for the Select component.
Prop | Type | Default | Required |
|---|---|---|---|
leadingItem | "none" | "icon" | "dot" | "checkbox" | "avatar" | "none" | optional |
leadingIcon | ReactNode | — | optional |
avatarSrc | string | "/svgs/SaudiAvatar.svg" | optional |
size | "large" | "medium" | "large" | optional |
options | SelectOption[] | [] | optional |
value | string | string[] | — | optional |
onChange | (value: string | string[]) => void | — | optional |
multiple | boolean | false | optional |
placeholder | string | "Select option" | optional |
label | string | — | optional |
required | boolean | false | optional |
helperText | string | — | optional |
error | string | — | optional |
disabled | boolean | false | optional |
leading | "none" | "icon" | "dot" | "checkbox" | "avatar" | "none" | optional |
labels | Partial<SelectLabels> | English strings | optional |
How this component behaves at the three system breakpoints. Spacing and type tokens switch automatically at 768px and 1280px.
| Screen | Behavior |
|---|---|
| Desktop (1280px and up) | Full width of its container. The option list opens below the field and scrolls after about six options. |
| Tablet (768–1279px) | Same layout as desktop, with the tablet token values. |
| Phone (under 768px) | Same behavior with the mobile token values. Long selected values are truncated; the list keeps the width of the field. |