Join our Discord Community

Shadcn Select

React select for custom dropdown menus with search, grouping, and keyboard navigation. Built with TypeScript and Tailwind CSS for Next.js using Radix UI.

Select component acting up?

Join our Discord community for help from other developers.


That dropdown where you pick one option from a list? That's what a select does. But unlike the boring native select, this one actually looks good, works with your keyboard, and doesn't make you want to cry when you try to style it. This shadcn/ui select brings proper dropdown experiences to your React applications.

Select showcase

Clean dropdown with grouped options:

Loading component...

Built on Radix UI Select with full keyboard navigation, typeahead search, and proper ARIA support. This free open source component handles all the complex positioning and focus management while looking exactly how you want. Styled with Tailwind CSS to match your design system instead of fighting browser default styling.

npx shadcn@latest add select

Why custom selects actually beat native ones

Here's the thing—native selects are basically the IE6 of form controls. They look different on every platform, can't be styled consistently, and offer zero customization options. Think about how frustrating it is when your beautifully designed form suddenly has an ugly system dropdown that doesn't match anything else.

Custom selects solve everything that's wrong with native ones. You get consistent styling across all browsers and devices, typeahead search for long lists, grouped options that actually make sense, and the ability to add icons, descriptions, or any content you need. Plus they work perfectly with keyboard navigation and screen readers.

This free shadcn select handles the complex parts—positioning magic, focus management, portal rendering, keyboard navigation—while you focus on creating dropdown experiences that actually enhance your forms. Whether you're building country selectors, status pickers, or preference settings in your Next.js applications, selects that work intuitively improve user experience in your JavaScript projects.

Common select patterns you'll actually use

Country selector

With flags and search for long lists:

Loading component...

Status selector

Visual indicators for different states:

Loading component...

Form with validation

Integrated with react-hook-form and validation:

Loading component...

Multi-column layout

When you need to show more information:

Loading component...

Category filter selector

Organized options with clear grouping:

Loading component...

Features

This free open source select component includes everything you need:

  • TypeScript-first - Full type safety with selection events and state management
  • Radix UI powered - Battle-tested positioning, focus management, and accessibility
  • Typeahead search - Start typing to jump to options instantly
  • Tailwind CSS styled - Customize with utilities, not fighting browser defaults
  • Keyboard accessible - Arrow keys, Enter, Escape, Page Up/Down all work perfectly
  • Grouped options - Organize long lists with labels and visual separation
  • Portal rendering - No z-index nightmares or positioning issues
  • Touch optimized - Works great on mobile without weird native pickers

API Reference

Core Components

ComponentPurposeKey Props
SelectRoot containervalue, onValueChange, open, disabled
SelectTriggerButton that opensStyling and interaction props
SelectContentDropdown panelposition, side, align for placement
SelectItemIndividual optionvalue, disabled, textValue for search

Selection Management

PropTypePurpose
valuestringCurrently selected value
defaultValuestringInitial selection for uncontrolled use
onValueChangefunctionCallback when selection changes
placeholderstringText shown when nothing selected

Content Organization

ComponentUse CasePurpose
SelectGroupOrganized optionsContainer for related items
SelectLabelSection headersVisual grouping with labels
SelectSeparatorVisual breaksDivide sections clearly

Production tips

Set consistent widths and don't let selects jump around. This free shadcn/ui select component adapts to content, but unpredictable width changes frustrate users. This TypeScript component handles the dropdown mechanics—you provide consistent trigger widths that maintain layout stability in your Next.js applications.

Use placeholders that actually help users understand the choice. "Select option" tells users nothing—"Choose your country" or "Pick a status" provides context. This open source shadcn select shows whatever placeholder text you provide—make it descriptive enough that users understand what they're selecting.

Group related options logically and keep scanning easy. Long lists become overwhelming without organization. This JavaScript component supports visual grouping with labels and separators—use them to create logical categories that match how users think about the options.

Handle long option lists with typeahead search and smart defaults. When you have dozens of options, users should be able to type to find what they need quickly. The Tailwind CSS styled component includes built-in typeahead—organize options alphabetically or by usage frequency to make searching intuitive.

Test keyboard navigation thoroughly and make it feel natural. Power users rely on keyboard shortcuts for form efficiency. This component handles arrow keys, Enter, Escape, and typeahead automatically—ensure your option order and grouping support smooth keyboard-only interaction patterns.

Integration with other components

Selects naturally work with Form components for validation and error handling in your React applications. Use Button components for consistent styling when selects appear alongside other form controls.

For complex interfaces, combine selects with Popover components for additional context or Command components when you need more advanced search functionality. This open source pattern creates powerful filtering and selection experiences.

When building data-heavy applications, pair selects with DataTable components for column filtering or Badge components to show selected filter states. Label components ensure proper accessibility associations with select triggers.

For multi-step workflows, use selects with Dialog components for settings panels or Sheet components for mobile-friendly option selection. Your JavaScript application can compose these shadcn components while maintaining consistent interaction patterns across different contexts.

Questions you might have