Pixelact Select
pixelact-ui/selectFreeComponent
A simple select component.
Live preview
live · rendered by the registry
Rendered by Pixelact UI on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://pixelactui.com/r/select.jsonSource
1import * as SelectPrimitive from "@radix-ui/react-select";2import { type VariantProps, cva } from "class-variance-authority";34import { cn } from "@/lib/utils";56import {7 Select as ShadcnSelect,8 SelectContent as ShadcnSelectContent,9 SelectGroup as ShadcnSelectGroup,10 SelectItem as ShadcnSelectItem,11 SelectLabel as ShadcnSelectLabel,12 SelectSeparator as ShadcnSelectSeparator,13 SelectValue as ShadcnSelectValue,14} from "@/components/ui/select";1516import "@/components/ui/pixelact-ui/styles/styles.css";1718export const inputVariants = cva("text-foreground", {19 variants: {20 font: {21 normal: "",22 pixel: "pixel-font",23 },24 },25 defaultVariants: {26 font: "pixel",27 },28});2930export interface SelectProps31 extends React.SelectHTMLAttributes<HTMLSelectElement>,32 VariantProps<typeof inputVariants> {33 asChild?: boolean;34}3536function Select({ ...props }: React.ComponentProps<typeof ShadcnSelect>) {37 return <ShadcnSelect {...props} />;38}3940function SelectGroup({41 ...props42}: React.ComponentProps<typeof SelectPrimitive.Group>) {43 return <ShadcnSelectGroup {...props} />;44}4546interface SelectValueProps47 extends React.ComponentProps<typeof SelectPrimitive.Value>,48 VariantProps<typeof inputVariants> {49 asChild?: boolean;50}5152function SelectValue({ font, ...props }: SelectValueProps) {53 return (54 <ShadcnSelectValue className={cn(inputVariants({ font }))} {...props} />55 );56}5758function SelectTrigger({59 children,60 className,61 font,62 size = "default",63 ...props64}: React.ComponentProps<typeof SelectPrimitive.Trigger> & {65 size?: "sm" | "default";66 font?: "normal" | "pixel";67}) {68 return (69 <div70 className={cn(71 "relative shadow-(--pixel-box-shadow) box-shadow-margin",72 inputVariants({ font }),73 className74 )}75 >76 <SelectPrimitive.Trigger77 data-slot="select-trigger"78 data-size={size}79 className={cn(80// … truncated
What it pulls in
Other registry items
Files it writes
More from Pixelact UI
All 28 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Pixelact Accordionaccordion | Pixelact UI | Components | Free | no deps · 2 files | |
| Pixelact Alertalert | Pixelact UI | Components | Free | no deps · 2 files | |
| Pixelact Alert Dialogalert-dialog | Pixelact UI | Components | Free | no deps · 2 files | |
| Pixelact Avataravatar | Pixelact UI | Components | Free | no deps · 2 files | |
| Pixelact Badgebadge | Pixelact UI | Components | Free | no deps · 2 files | |
| Pixelact Breadcrumbbreadcrumb | Pixelact UI | Components | Free | no deps · 2 files | |
| Pixelact Buttonbutton | Pixelact UI | Components | Free | no deps · 3 files | |
| Pixelact Calendarcalendar | Pixelact UI | Components | Free | no deps · 2 files |
