Components
Styled Select
A native select with a custom look.
<StyledSelect label="Region">
<option>…</option>
</StyledSelect>Installation
npx shadcn@latest add https://ui.zjkm.tech/r/styled-select.jsonimport { StyledSelect } from "@/components/styled-select"Using JavaScript? Set tsx: false in components.json and the CLI converts it.
New to shadcn? Run npx shadcn@latest init first. The CLI needs components.json and the @/ import alias.
Usage
A native <select> with a clean border and chevron. Because it's the browser's own control, it works with every keyboard, screen reader and phone picker.
import { StyledSelect } from "@/components/styled-select";
export function Region() {
return (
<StyledSelect label="Region" name="region" defaultValue="eu">
<option value="us">United States</option>
<option value="eu">Europe</option>
</StyledSelect>
);
}Props
| Prop | Type | Default | Description |
|---|---|---|---|
label | string | The label. | |
children | ReactNode | Your <option>s. | |
className | string | Classes for the wrapper. | |
...props | select props | Every native <select> prop. |
It has no animation, so reduced motion changes nothing.