Radio#

Radio button component for selecting one option from a group. Supports both compound pattern with Radio.Item and standalone usage.

Import#

TSX
import { Radio, Col, Card, Heading, Row, Text } from '@sigx/daisyui';

Basic Usage (Compound Pattern)#

Use Radio with Radio.Item children for grouped radio buttons:

TSX
Loading preview...

Sizes#

TSX
Loading preview...

Colors#

TSX
Loading preview...

Horizontal Direction#

TSX
Loading preview...

Standalone Radio#

For cases where you need more control, use Radio.Standalone:

TSX
Loading preview...

With Disabled Options#

TSX
Loading preview...

Survey Example#

TSX
Loading preview...

Props#

Radio (RadioGroup) Props#

PropTypeDefaultDescription
model() => signal.property-Model binding for selected value
namestringrequiredHTML name attribute for the radio group
size'xs' | 'sm' | 'md' | 'lg''md'Size of all radio buttons
color'primary' | 'secondary' | 'accent' | 'info' | 'success' | 'warning' | 'error'-Color of all radio buttons
direction'horizontal' | 'vertical''vertical'Layout direction
disabledbooleanfalseDisable all radio buttons
classstring-Additional CSS classes

Radio.Item Props#

PropTypeDefaultDescription
valuestringrequiredValue when this option is selected
labelstring-Label text
disabledbooleanfalseDisable this specific option
classstring-Additional CSS classes

Radio.Standalone Props#

PropTypeDefaultDescription
namestringrequiredHTML name attribute
valuestringrequiredValue of this radio button
checkedbooleanfalseWhether this radio is selected
labelstring-Label text
size'xs' | 'sm' | 'md' | 'lg''md'Size
color'primary' | 'secondary' | 'accent' | 'info' | 'success' | 'warning' | 'error'-Color
disabledbooleanfalseDisable the radio
classstring-Additional CSS classes

Events#

EventTypeDescription
onChange(value: string) => voidFired when selection changes