ZuzJS UI

ZuzJS

UI

v1.0.71

⌃K

Concepts

Overview

Composition

Layout

Accordion

Alert

Auto Complete

Avatar

Badge

Box

Button

Calendar

Chart

ChatBubble

ChatList

Checkbox

ColorScheme

ContextMenu

CookiesConsent

Cover

Cropper

Crumb

DatePicker

Dialog

Drawer

Fab

Filters

Form

Group

Icon

Image

Input

KeyboardKeys

Label

List

NetworkStatus

Overlay

Pagination

Password

PinInput

ProgressBar

Radio

ScrollView

Slider

Search

SelectTabs

Select

Sheet

Slider

Span

Spinner

Switch

Table

TabView

Text

TextArea

TextWheel

Toast

Tooltip

Treeview

On this page

  • Overview
  • Basic Anatomy

Radio

Documentation for Radio component

Radio

1 <Radio label="Option 1" value="opt1" onChange={(val) => console.log(val)} />

Usage

import { Radio } from "@zuzjs/ui"
<Radio label="Option 1" value="opt1" onChange={(val) => console.log(val)} />

Props

Prop
Type
Required
Description
label
—
—
Label text for the component
value
string | number | readonly string[]) => void
Yes
Current value
onChange
—
—
Callback function triggered when value changes
defaultChecked
—
—
Whether component is checked by default
variant
ValueOf<typeof Variant>
No
Visual variant or style
ZuzProps
Props<"input">
—
Shared base props

Examples

Basic Usage

<Radio label="Option 1" value="opt1" onChange={(val) => console.log(val)} />

Example 2

<Radio label="Option 1" value="opt1" defaultChecked={true} variant="primary" />