Aurora Native Select
aurora-dinglebear-ai/aurora-native-selectUnverifiedComponent
Browser-native select with Aurora control styling, chevron affordance, and native select ref/event semantics.
Install it
npx shadcn@latest add https://raw.githubusercontent.com/dinglebear-ai/aurora/main/aurora-native-select.jsonSource
1"use client"23import * as React from "react"4import { ChevronDown } from "lucide-react"5import { cn } from "@/lib/utils"67export interface NativeSelectProps extends React.SelectHTMLAttributes<HTMLSelectElement> {8 placeholder?: string9}1011function NativeSelect({ className, style, children, placeholder, disabled, onFocus, onBlur, ref, ...props }: NativeSelectProps & { ref?: React.Ref<HTMLSelectElement> }) {12 return (13 <span className="relative inline-flex w-full items-center">14 <select15 {...props}16 ref={ref}17 disabled={disabled}18 className={cn(19 "h-9 w-full appearance-none rounded-[var(--aurora-radius-2)] border px-4 py-2 pr-10",20 "font-[var(--aurora-font-sans)]",21 "text-[var(--aurora-text-primary)]",22 "transition-all duration-150 ease-out",23 "focus-visible:outline-none",24 "cursor-pointer",25 "disabled:pointer-events-none disabled:opacity-45 disabled:cursor-not-allowed",26 className27 )}28 style={{29 background: "var(--aurora-control-surface)",30 borderColor: "var(--aurora-border-strong)",31 color: "var(--aurora-text-primary)",32 fontSize: "var(--aurora-type-body-sm)",33 fontWeight: "var(--aurora-weight-body)",34 letterSpacing: "var(--aurora-letter-ui)",35 lineHeight: "var(--aurora-line-ui)",36 ...style,37 }}38 onFocus={(event) => {39 event.currentTarget.dataset.previousBorderColor = event.currentTarget.style.borderColor40 event.currentTarget.dataset.previousBoxShadow = event.currentTarget.style.boxShadow41 event.currentTarget.style.borderColor = "color-mix(in srgb, var(--aurora-accent-primary) 42%, var(--aurora-border-strong))"42 event.currentTarget.style.boxShadow =43 "0 0 0 2px color-mix(in srgb, var(--aurora-accent-primary) 22%, transparent)"44 onFocus?.(event)45 }}46 onBlur={(event) => {47 event.currentTarget.style.borderColor = event.currentTarget.dataset.previousBorderColor ?? ""48 event.currentTarget.style.boxShadow = event.currentTarget.dataset.previousBoxShadow ?? ""49 onBlur?.(event)50 }}51 >52 {placeholder ? (53 <option value="" disabled>54 {placeholder}55 </option>56 ) : null}57 {children}58 </select>59 <ChevronDown60 aria-hidden="true"61// … truncated
What it pulls in
npm packages
Other registry items
Files it writes
More from aurora
All 176 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Aurora Accordionaurora-accordion | aurora | Components | Unverified | 2 deps | |
| Aurora Alert Dialogaurora-alert-dialog | aurora | Components | Unverified | 2 deps | |
| Aurora Aspect Ratioaurora-aspect-ratio | aurora | Components | Unverified | no deps | |
| Aurora Avataraurora-avatar | aurora | Components | Unverified | 1 dep | |
| Aurora Badgeaurora-badge | aurora | Components | Unverified | 2 deps | |
| Aurora Banneraurora-banner | aurora | Components | Unverified | 1 dep | |
| Aurora Breadcrumbaurora-breadcrumb | aurora | Components | Unverified | 2 deps | |
| Aurora Buttonaurora-button | aurora | Components | Unverified | 2 deps |
