Native Select

A styled native HTML select element that provides a lightweight dropdown for simple selection scenarios, with size variants and full type-safe generic binding.

Default

A basic NativeSelect with a Placeholder and static option elements. The component renders a native <select> with custom styling including a chevron indicator, rounded borders, and focus ring. Use @bind-Value for two-way binding to track the selected option.
Loading example…

Sizes

Use the Size parameter to control the select dimensions. Available sizes are Small for compact layouts with reduced height and text, Default for standard usage, and Large for prominent selections with increased height and text size.
Loading example…

Disabled

Set Disabled to true to prevent user interaction. The select appears with reduced opacity and a not-allowed cursor, and cannot be opened. This is useful for read-only states or when a prerequisite condition must be met first.
Loading example…

With Option Groups

Since NativeSelect renders a native <select> element, you can use standard HTML <optgroup> elements to organize options into labeled groups. This is ideal for categorizing long lists such as countries by region or products by category.
Loading example…

Custom Variant

Use the Class parameter to apply custom Tailwind CSS classes for project-specific styles. You can change the border color, focus ring, background, or border radius to match your design system without creating a new component.
Loading example…

In Form

Use NativeSelect with Field and Label components for accessible form layouts. The native select integrates cleanly with form field patterns because it uses the browser's built-in form behavior, making it a great choice for simple forms that do not need search or filtering.
Loading example…

Registration Form

A real-world registration form composition using NativeSelect alongside Input components inside a Card. This demonstrates how native selects integrate naturally into complete form layouts where search functionality is not needed.
Loading example…