A shadcn-style radio group component built with Ark UI primitives.

Framework

Installation

npx shadcn@latest add @ark-cn/radio-group

Usage

import * as RadioGroup from "@/components/ui/radio-group"

Read exported parts in src/components/ui/radio-group.tsx and compose the primitive according to the Ark UI pattern for this component.

Examples

Default

Framework

Controlled

Value: next

Disabled group

Framework (group disabled)

Disabled item

Framework

Orientation

Axis

Root provider

Framework

With fieldset

Select a framework
Choose your preferred framework for the docs examples.

With description

Card style

Form

Frameworks

Read-only

Read-only

Invalid

Invalid state

With field

Pick one framework for the project.

Context hook

useRadioGroupContext: b

Context render

RadioGroupContext: next

API reference

This component mirrors the upstream Ark UI primitive.

See the ARK UI documentation for the full API.

Accessibility

See the Ark UI documentation for clarification.