Select (native)
Select (native) is a neobrutalist React component from Cruise UI. A native <select> styled like the inputs, with an ink chevron. Install it with npx shadcn@latest add @cruiseui/select.
Install
Terminal
npx shadcn@latest add @cruiseui/selectFirst time? Installation shows the one-off components.json setup (the @cruiseui registry) and how to turn the theme on.
Example
Corners
We'll text you when the rider leaves.
Choose your state.
import { CruiseSelect } from "@/components/cruise/select";
export default function SelectExample() {
return (
<div className="grid gap-6 md:grid-cols-2">
<CruiseSelect label="Delivery time" defaultValue="morning" hint="We'll text you when the rider leaves.">
<option value="morning">Morning (8am – 12 noon)</option>
<option value="afternoon">Afternoon (12 noon – 4pm)</option>
<option value="evening">Evening (4pm – 8pm)</option>
</CruiseSelect>
<CruiseSelect label="State" defaultValue="" error="Choose your state.">
<option value="" disabled>
Choose a state
</option>
<option value="lagos">Lagos</option>
<option value="oyo">Oyo</option>
</CruiseSelect>
</div>
);
}
<div class="field">
<label class="field-label" for="state">State</label>
<span class="select-wrap">
<select class="select" id="state" name="state" aria-invalid="true" aria-describedby="state-error">
<option value="" disabled selected>Choose a state</option>
<option value="lagos">Lagos</option>
<option value="oyo">Oyo</option>
</select>
</span>
<p class="field-error" id="state-error">Choose your state.</p>
</div>Needs theme.css. Interactive parts (menus, tabs, drawers) also need the script in the spec for that component.
When to use it
When to use
Picking one option from under ~8 in a form. The default choice for forms: phones open their own picker.
When not to
Long lists people search (use a Combobox). Actions (use a Dropdown menu).
Props
CruiseSelect
| Prop | Type | Default | Description |
|---|---|---|---|
label? | string | — | Visible label. Leave out inside a CruiseFormField (it brings the label). |
hint? | string | — | Helper text under the field. |
error? | string | — | Error message; turns the border and helper text --danger. |
Also takes every native <select> attribute.
Accessibility
- Native select: every keyboard and screen reader already knows it.
- Always a visible <label>; errors use aria-invalid and aria-describedby.