select
agentmesh/selectFreeComponent
shadcn/ui publishes no description for this item.
Live preview
live · rendered by the registry
Rendered by shadcn/ui on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://raw.githubusercontent.com/ombhanushaliii/agentmesh/main/example/ui/apps/v4/public/r/styles/base-vega/select.jsonSource
1"use client"23import * as React from "react"4import { Select as SelectPrimitive } from "@base-ui/react/select"56import { cn } from "@/registry/base-vega/lib/utils"7import { IconPlaceholder } from "@/app/(create)/components/icon-placeholder"89const Select = SelectPrimitive.Root1011function SelectGroup({ className, ...props }: SelectPrimitive.Group.Props) {12 return (13 <SelectPrimitive.Group14 data-slot="select-group"15 className={cn("scroll-my-1 p-1", className)}16 {...props}17 />18 )19}2021function SelectValue({ className, ...props }: SelectPrimitive.Value.Props) {22 return (23 <SelectPrimitive.Value24 data-slot="select-value"25 className={cn("flex flex-1 text-left", className)}26 {...props}27 />28 )29}3031function SelectTrigger({32 className,33 size = "default",34 children,35 ...props36}: SelectPrimitive.Trigger.Props & {37 size?: "sm" | "default"38}) {39 return (40 <SelectPrimitive.Trigger41 data-slot="select-trigger"42 data-size={size}43 className={cn(44 "flex w-fit items-center justify-between gap-1.5 rounded-md border border-input bg-transparent py-2 pr-2 pl-2.5 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",45 className46 )}47 {...props}48 >49 {children}50 <SelectPrimitive.Icon51 render={52 <IconPlaceholder53 lucide="ChevronDownIcon"54 tabler="IconSelector"55 hugeicons="UnfoldMoreIcon"56 phosphor="CaretDownIcon"57 remixicon="RiArrowDownSLine"58 className="pointer-events-none size-4 text-muted-foreground"59 />60 }61 />62 </SelectPrimitive.Trigger>63 )64}6566function SelectContent({67 className,68 children,69 side = "bottom",70 sideOffset = 4,71 align = "center",72 alignOffset = 0,73 alignItemWithTrigger = true,74 ...props75// … truncated
Files it writes
More from shadcn/ui
All 201 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| accordionaccordion | shadcn/ui | Components | Free | no deps | |
| alertalert | shadcn/ui | Components | Free | no deps | |
| alert-dialogalert-dialog | shadcn/ui | Components | Free | no deps | |
| aspect-ratioaspect-ratio | shadcn/ui | Components | Free | no deps | |
| avataravatar | shadcn/ui | Components | Free | no deps | |
| badgebadge | shadcn/ui | Components | Free | no deps | |
| breadcrumbbreadcrumb | shadcn/ui | Components | Free | no deps | |
| buttonbutton | shadcn/ui | Components | Free | no deps |
