Radio Group

A set of mutually exclusive choices with support for uncontrolled fields, controlled state, and horizontal layouts.

Installation

$npx maddex add RadioGroup

Default Value

Start with an uncontrolled radio group when the field can manage its own selected value until a form submits it.

Preview

        
            
        
    

Controlled State

Use value and on-value-change when other panels on the page need to stay in sync with the current selection.

Preview

        
            
        
    

Horizontal Layout

Switch to orientation="horizontal" when the choices should read like a compact segmented control.

Preview