snapshot of https://github.com/shadcn-ui/ui.git (main, 2026-09-15; blobs > 131072B omitted)
This commit is contained in:
49
apps/v4/examples/aria/field-select.tsx
Normal file
49
apps/v4/examples/aria/field-select.tsx
Normal file
@@ -0,0 +1,49 @@
|
||||
import {
|
||||
Field,
|
||||
FieldDescription,
|
||||
FieldLabel,
|
||||
} from "@/styles/aria-nova/ui/field"
|
||||
import {
|
||||
Select,
|
||||
SelectContent,
|
||||
SelectGroup,
|
||||
SelectItem,
|
||||
SelectTrigger,
|
||||
SelectValue,
|
||||
} from "@/styles/aria-nova/ui/select"
|
||||
|
||||
const items = [
|
||||
{ label: "Engineering", value: "engineering" },
|
||||
{ label: "Design", value: "design" },
|
||||
{ label: "Marketing", value: "marketing" },
|
||||
{ label: "Sales", value: "sales" },
|
||||
{ label: "Customer Support", value: "support" },
|
||||
{ label: "Human Resources", value: "hr" },
|
||||
{ label: "Finance", value: "finance" },
|
||||
{ label: "Operations", value: "operations" },
|
||||
]
|
||||
|
||||
export default function FieldSelect() {
|
||||
return (
|
||||
<Field className="w-full max-w-xs">
|
||||
<FieldLabel>Department</FieldLabel>
|
||||
<Select placeholder="Choose department">
|
||||
<SelectTrigger>
|
||||
<SelectValue />
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
<SelectGroup>
|
||||
{items.map((item) => (
|
||||
<SelectItem key={item.value} id={item.value}>
|
||||
{item.label}
|
||||
</SelectItem>
|
||||
))}
|
||||
</SelectGroup>
|
||||
</SelectContent>
|
||||
</Select>
|
||||
<FieldDescription>
|
||||
Select your department or area of work.
|
||||
</FieldDescription>
|
||||
</Field>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user