Select

Displays a list of options for the user to pick from—triggered by a button.

Installation
# Install @opencosmos/ui to use Select
pnpm add @opencosmos/ui
Preview
Loading preview...
Usage
Import
import { Select, SelectTrigger, SelectContent, SelectItem, SelectValue } from '@opencosmos/ui';
Example
<Select>
  Content
</Select>
Eject
Copy this component into your project for full customization

Code Examples

Basic Usage

Basic select dropdown

import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@opencosmos/ui';

<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>