Skip to Content
zjkm-ui
Components

Styled Select

A native select with a custom look.

Props
<StyledSelect label="Region">
  <option>…</option>
</StyledSelect>

Installation

npx shadcn@latest add https://ui.zjkm.tech/r/styled-select.json
import { 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

PropTypeDefaultDescription
labelstringThe label.
childrenReactNodeYour <option>s.
classNamestringClasses for the wrapper.
...propsselect propsEvery native <select> prop.

It has no animation, so reduced motion changes nothing.

On this page