Components

A dropdown selector for single or multiple options.

Installation

npm install @mijn-ui/react-select

Usage

import {
  Select,
  SelectContent,
  SelectItem,
  SelectTrigger,
  SelectValue,
} from "@mijn-ui/react-select"
<Select>
  <SelectTrigger className="w-[180px]">
    <SelectValue placeholder="Theme" />
  </SelectTrigger>
  <SelectContent>
    <SelectItem value="light">Light</SelectItem>
    <SelectItem value="dark">Dark</SelectItem>
    <SelectItem value="system">System</SelectItem>
  </SelectContent>
</Select>

Examples

Scrollable


API Reference

Built on Radix UI — all underlying primitive props are forwarded in addition to the props below.

PropTypeDefaultDescription
unstyledbooleanfalseOpt out of the default styles to fully customize the component.
classNamesobjectOverride classes per slot (see Style Slots below).
classNamestringAdditional classes for the root element.

Select Style Slots

Slot NameTargeted ComponentPurpose
baseSelectStyles the root select component.
triggerSelectTriggerStyles the trigger for opening the select.
scrollUpBtnSelectScrollUpButtonStyles the scroll-up button in the select.
scrollDownBtnSelectScrollDownButtonStyles the scroll-down button in the select.
contentSelectContentStyles the select content container.
viewportSelectContentStyles the viewport of the select content.
labelSelectLabelStyles the label within the select.
itemSelectItemStyles individual select items.
itemIndicatorSelectItemStyles the indicator for selected items.
separatorSelectSeparatorStyles the separator between select items.