snapshot of https://github.com/shadcn-ui/ui.git (main, 2026-09-15; blobs > 131072B omitted)
This commit is contained in:
39
apps/v4/examples/aria/field-radio.tsx
Normal file
39
apps/v4/examples/aria/field-radio.tsx
Normal file
@@ -0,0 +1,39 @@
|
||||
import {
|
||||
Field,
|
||||
FieldDescription,
|
||||
FieldLabel,
|
||||
FieldLegend,
|
||||
FieldSet,
|
||||
} from "@/styles/aria-nova/ui/field"
|
||||
import { RadioGroup, RadioGroupItem } from "@/styles/aria-nova/ui/radio-group"
|
||||
|
||||
export function FieldRadio() {
|
||||
return (
|
||||
<FieldSet className="w-full max-w-xs">
|
||||
<FieldLegend variant="label">Subscription Plan</FieldLegend>
|
||||
<FieldDescription>
|
||||
Yearly and lifetime plans offer significant savings.
|
||||
</FieldDescription>
|
||||
<RadioGroup defaultValue="monthly">
|
||||
<Field orientation="horizontal">
|
||||
<RadioGroupItem value="monthly" id="plan-monthly" />
|
||||
<FieldLabel htmlFor="plan-monthly" className="font-normal">
|
||||
Monthly ($9.99/month)
|
||||
</FieldLabel>
|
||||
</Field>
|
||||
<Field orientation="horizontal">
|
||||
<RadioGroupItem value="yearly" id="plan-yearly" />
|
||||
<FieldLabel htmlFor="plan-yearly" className="font-normal">
|
||||
Yearly ($99.99/year)
|
||||
</FieldLabel>
|
||||
</Field>
|
||||
<Field orientation="horizontal">
|
||||
<RadioGroupItem value="lifetime" id="plan-lifetime" />
|
||||
<FieldLabel htmlFor="plan-lifetime" className="font-normal">
|
||||
Lifetime ($299.99)
|
||||
</FieldLabel>
|
||||
</Field>
|
||||
</RadioGroup>
|
||||
</FieldSet>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user