Native Select

@sushindustries/ui

The platform's own select in the site's clothes - the phone wheel and the OS menu, kept.

4 min read
View as MarkdownEdit on GitHub

Examples are the tab where the component is shown doing a job, not demonstrating a prop. The API tab already lists the props.

Viewport width
Phone22remthe floor, the narrowest this promises to work at
tanstacktanstack add https://adamjurek.com/r/tanstack/native-select.jsonshadcnpnpm dlx shadcn@latest add https://adamjurek.com/r/shadcn/native-select.json

Press Compare. The frames are real viewports, so a layout that breaks at 320 breaks here too rather than in somebody's hands.

In a page

import { NativeSelect } from "@sushindustries/ui";

export function ShippingForm() {
	return (
		<form className="flex flex-col gap-4">
			<label className="field">
				<span className="label">Country</span>
				<NativeSelect name="country" required defaultValue="">
					<option value="" disabled>
						Choose one
					</option>
					<option value="pl">Poland</option>
					<option value="de">Germany</option>
				</NativeSelect>
			</label>
			<label className="field">
				<span className="label">Size</span>
				<NativeSelect name="size" defaultValue="m">
					<option value="s">S</option>
					<option value="m">M</option>
					<option value="l">L</option>
				</NativeSelect>
			</label>
		</form>
	);
}
tsx
UsesIconIconThe glyph set, generated from a Markdown table where every drawing carries its reason. One component, typed names, no icon font.@sushindustries/ui · content