snapshot of https://github.com/shadcn-ui/ui.git (main, 2026-09-15; blobs > 131072B omitted)
This commit is contained in:
30
apps/v4/examples/radix/select-invalid.tsx
Normal file
30
apps/v4/examples/radix/select-invalid.tsx
Normal file
@@ -0,0 +1,30 @@
|
||||
import { Field, FieldError, FieldLabel } from "@/styles/radix-nova/ui/field"
|
||||
import {
|
||||
Select,
|
||||
SelectContent,
|
||||
SelectGroup,
|
||||
SelectItem,
|
||||
SelectTrigger,
|
||||
SelectValue,
|
||||
} from "@/styles/radix-nova/ui/select"
|
||||
|
||||
export function SelectInvalid() {
|
||||
return (
|
||||
<Field data-invalid className="w-full max-w-48">
|
||||
<FieldLabel>Fruit</FieldLabel>
|
||||
<Select>
|
||||
<SelectTrigger aria-invalid>
|
||||
<SelectValue placeholder="Select a fruit" />
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
<SelectGroup>
|
||||
<SelectItem value="apple">Apple</SelectItem>
|
||||
<SelectItem value="banana">Banana</SelectItem>
|
||||
<SelectItem value="blueberry">Blueberry</SelectItem>
|
||||
</SelectGroup>
|
||||
</SelectContent>
|
||||
</Select>
|
||||
<FieldError>Please select a fruit.</FieldError>
|
||||
</Field>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user