SelectOld
SelectOld is the legacy native-select wrapper. Prefer Select for new code.
Usage
import SelectOld from "@repo/ui/SelectOld";
<SelectOld defaultValue="one">
<option value="one">گزینه اول</option>
<option value="two">گزینه دوم</option>
</SelectOld>;
Installation
npx the-dig@latest add SelectOld
Props
| Prop | Type | Default |
|---|---|---|
variant | "primary" | "secondary" | "primary" |
hasError | boolean | false |
startAdornment | ReactNode | - |
inputWrapperProps | HTMLAttributes<HTMLDivElement> | - |
| Others | SelectHTMLAttributes<HTMLSelectElement> | Native defaults |
Options are supplied as native <option> children. Use a visible label and associate error text with the select for accessibility.