Native Select

Styled native select element — SSR-safe, no JS.

NativeSelect is a styled <select> — it renders identically on the server, works without JavaScript, and submits with plain HTML forms. For search, rich item rendering and popovers use Select.

Installation

import { NativeSelect } from "@iammikz/srui";

Usage

Sizes and invalid

size maps to h-8 / h-9 / h-10; invalid paints the destructive border and sets aria-invalid. A disabled-looking first option with an empty value doubles as the placeholder.

Props

All native <select> attributes plus:

PropTypeDefaultDescription
size"sm" | "default" | "lg""default"h-8 / h-9 / h-10
invalidbooleanfalseDestructive border + aria-invalid