@neynar/ui
Version:
React UI component library built on shadcn/ui and Tailwind CSS
75 lines (63 loc) • 1.69 kB
Markdown
in the dropdown Represents a single option that users can select. Built on Radix UI Select.Item with enhanced styling including hover states, selection indicators, and proper spacing. Shows a checkmark when selected and supports keyboard navigation with proper focus management.
```jsx
import { SelectItem } from '@neynar/ui';
<SelectItem
asChild={true}
value="value"
disabled={true}
textValue="value"
>
{/* Your content here */}
</SelectItem>
```
- **Type**: `boolean`
- **Required**: No
- **Description**: No description available
- **Type**: `string`
- **Required**: Yes
- **Description**: No description available
- **Type**: `boolean`
- **Required**: No
- **Description**: No description available
- **Type**: `string`
- **Required**: No
- **Description**: No description available
```tsx
// Basic item
<SelectItem value="apple">Apple</SelectItem>
```
```tsx
// Disabled item that cannot be selected
<SelectItem value="sold-out" disabled>
Sold Out - Unavailable
</SelectItem>
```
```tsx
// Complex item content with custom text value for typeahead
<SelectItem value="user-123" textValue="John Doe">
<div className="flex items-center gap-2">
<Avatar size="sm" />
<div>
<div>John Doe</div>
<div className="text-xs text-muted-foreground">john
```tsx
// Using asChild for custom item composition
<SelectItem value="custom" asChild>
<div className="custom-item-styles">
Custom item content
</div>
</SelectItem>
```
**Type**: component
SelectItem - Individual selectable option