Native Select

A React native select that styles the browser's own select element, keeping the phone picker, with grouped options, error states, and an inline size.

Loading preview

Examples

Practical examples and common states for the same installable component.

Grouped

Organizes related options into labeled groups.

examples/native-select-grouped.tsx
import { NativeSelect } from "@/components/wensity/native-select";
export function NativeSelectGrouped() {
return (
<NativeSelect
groups={[
{
label: "Frontend",
options: [
{ value: "react", label: "React" },
{ value: "vue", label: "Vue" },
],
},
{
label: "Backend",
options: [
{ value: "nextjs", label: "Next.js" },
{ value: "nuxt", label: "Nuxt" },
],
},
]}
label="Framework"
placeholder="Choose a framework"
/>
);
}

Disabled

Displays unavailable options and states.

examples/native-select-disabled.tsx
import { NativeSelect } from "@/components/wensity/native-select";
export function NativeSelectDisabled() {
return (
<NativeSelect
options={[
{ value: "free", label: "Free - $0/mo" },
{ value: "pro", label: "Pro - $29/mo" },
{ value: "team", label: "Team - $79/mo", disabled: true },
]}
label="Plan"
defaultValue="pro"
/>
);
}

Placeholder

Shows an initial unselected prompt.

examples/native-select-placeholder.tsx
import { NativeSelect } from "@/components/wensity/native-select";
export function NativeSelectPlaceholder() {
return (
<NativeSelect
options={[
{ value: "us", label: "United States" },
{ value: "ca", label: "Canada" },
{ value: "gb", label: "United Kingdom" },
]}
label="Country"
placeholder="Select your country"
/>
);
}

Error

Displays invalid selection and validation states.

examples/native-select-error.tsx
import { NativeSelect } from "@/components/wensity/native-select";
export function NativeSelectError() {
return (
<NativeSelect
options={[
{ value: "us", label: "United States" },
{ value: "ca", label: "Canada" },
]}
label="Region"
placeholder="Select a region"
error="Please select a valid region."
required
/>
);
}

Inline

Compact select for dense interface layouts.

examples/native-select-inline.tsx
import { NativeSelect } from "@/components/wensity/native-select";
export function NativeSelectInline() {
return (
<NativeSelect
options={[
{ value: "10", label: "10 / page" },
{ value: "25", label: "25 / page" },
{ value: "50", label: "50 / page" },
{ value: "100", label: "100 / page" },
]}
selectSize="inline"
defaultValue="25"
fullWidth={false}
/>
);
}

Overview

Native Select is a React and Tailwind CSS styled native select, in Next.js or any React app, that keeps the browser's own select element and dropdown. That brings the system picker on phones, built in keyboard handling, and normal form submission. Pass options, labeled groups that render as optgroup, or plain option children, plus a label, hint, and error, which sets aria-invalid and an alert message. sm, md, lg, and an inline size fit forms and sentences. Options are plain text, since a native option cannot hold icons, so use Select when rows need icons or descriptions.

Installation

Run the following command

~/your-project
pnpm dlx wensity@latest add native-select

Usage

Import NativeSelect from @/components/wensity/native-select and render it anywhere in your React or Next.js app. The source lands in your own repo, so every prop, class and animation below is yours to edit.

app/example.tsx
import { NativeSelect } from "@/components/wensity/native-select";
export function NativeSelectDemo() {
return (
<NativeSelect
label="Country"
placeholder="Select your country"
defaultValue="us"
options={[
{ value: "us", label: "United States" },
{ value: "ca", label: "Canada" },
{ value: "gb", label: "United Kingdom" },
]}
/>
);
}

Props

PropTypeDefaultDescription
optionsNativeSelectOption[]-Choices to render as native option elements.
groupsNativeSelectGroup[]-Grouped choices, rendered as native optgroup sections.
placeholderstring-Shown as a disabled first option while nothing is selected.
labelReact.ReactNode-Field label above the control.
hintReact.ReactNode-Helper copy under the control.
errorReact.ReactNode-Error message under the control, with invalid styling applied.
selectSize"sm" | "md" | "lg" | "inline""md"Control height and text size. inline strips the field chrome.
fullWidthbooleantrueStretches the control to fill its container.
  • AI Model Selector component preview

    AI Model Selector

    An AI model selector dropdown that scales out from its trigger and glides the selection pill to whichever model you pick.

  • Gooey Dropdown Menu component preview

    Gooey Dropdown Menu

    A capsule trigger drips a menu out of its underside. Arrow keys, live shortcuts, and a clear Delete row come built in.

  • Multi-Step Form Wizard component preview

    Multi-Step Form Wizard

    A multi-step form wizard whose card physically reshapes to wrap each new step as the content slides in behind it.

  • Subscription Tier Card component preview

    Subscription Tier Card

    Pricing cards with a monthly and annual toggle, prices that spring to new values, and a highlighted plan in a brand glow.