select
neobrutalui/selectFreeComponent
Choose a single option from a collapsible list.
Live preview
live · rendered by the registry
Rendered by neobrutalui on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://www.neobrutalui.live/r/select.jsonSource
1"use client"23import * as React from "react"4import { Select as BaseSelect } from "@base-ui/react/select"5import { Check, ChevronDown, ChevronUp } from "lucide-react"6import { cn } from "@/lib/utils"78const Select = BaseSelect.Root910const SelectGroup = BaseSelect.Group1112type SelectValueProps = React.ComponentPropsWithoutRef<typeof BaseSelect.Value> & {13 placeholder?: string14}1516const SelectValue = React.forwardRef<17 React.ComponentRef<typeof BaseSelect.Value>,18 SelectValueProps19>(({ placeholder, ...props }, ref) => (20 <BaseSelect.Value ref={ref} {...props}>21 {(value) => value ?? placeholder}22 </BaseSelect.Value>23))24SelectValue.displayName = "SelectValue"2526type SelectTriggerProps = React.ComponentPropsWithoutRef<typeof BaseSelect.Trigger>2728const SelectTrigger = React.forwardRef<29 React.ComponentRef<typeof BaseSelect.Trigger>,30 SelectTriggerProps31>(({ className, children, ...props }, ref) => (32 <BaseSelect.Trigger33 ref={ref}34 className={cn(35 "flex h-10 w-full items-center justify-between rounded-base border-2 border-black bg-white px-3 py-2 text-sm placeholder:text-black focus-brutal disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",36 className37 )}38 {...props}39 >40 {children}41 <BaseSelect.Icon>42 <ChevronDown43 aria-hidden="true"44 className="h-4 w-4 opacity-50"45 />46 </BaseSelect.Icon>4748 </BaseSelect.Trigger>49))50SelectTrigger.displayName = "SelectTrigger"5152type SelectScrollUpButtonProps = React.ComponentPropsWithoutRef<typeof BaseSelect.ScrollUpArrow>5354const SelectScrollUpButton = React.forwardRef<55 React.ComponentRef<typeof BaseSelect.ScrollUpArrow>,56 SelectScrollUpButtonProps57>(({ className, ...props }, ref) => (58 <BaseSelect.ScrollUpArrow59 ref={ref}60 className={cn(61 "flex cursor-default items-center justify-center py-1",62 className63 )}64 {...props}65 >66 <ChevronUp aria-hidden="true" className="h-4 w-4" />6768 </BaseSelect.ScrollUpArrow>69))70SelectScrollUpButton.displayName = "SelectScrollUpButton"7172type SelectScrollDownButtonProps = React.ComponentPropsWithoutRef<typeof BaseSelect.ScrollDownArrow>7374const SelectScrollDownButton = React.forwardRef<75 React.ComponentRef<typeof BaseSelect.ScrollDownArrow>,76 SelectScrollDownButtonProps77// … truncated
What it pulls in
npm packages
Other registry items
More from neobrutalui
All 24 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| accordionaccordion | neobrutalui | Components | Free | 2 deps | |
| alertalert | neobrutalui | Components | Free | 1 dep | |
| avataravatar | neobrutalui | Components | Free | no deps | |
| badgebadge | neobrutalui | Components | Free | 1 dep | |
| buttonbutton | neobrutalui | Components | Free | 1 dep | |
| cardcard | neobrutalui | Components | Free | no deps | |
| checkboxcheckbox | neobrutalui | Components | Free | 2 deps | |
| date-pickerdate-picker | neobrutalui | Components | Free | 2 deps |
