XiodUI
HomeDocs
OverviewComponentsThemes & ColorsChangelog
⌘ K

Components

  • Accordion
  • Agent Steps
    New
  • Alert
  • Alert Dialog
  • Aspect Ratio
    New
  • Autocomplete
  • Avatar
  • Badge
  • Breadcrumb
  • Button
    Updated
  • Button Group
    New
  • Button Split
    New
  • Calendar
    New
  • Card
  • Carousel
    New
  • Checkbox
  • Circular Progress
    New
  • Collapsible
  • Color Picker
    New
  • Combobox
  • Command
  • Context Menu
    New
  • Copy To Clipboard
    New
  • Corner Badge
    New
  • Dashboard Grid
    New
  • Date Picker
    New
  • Dialog
  • Dot Matrix
    New
  • Draggable
    New
  • Drawer
    New
  • Empty
  • Field
  • Fieldset
  • File Upload
    New
  • Form
  • Frame
  • Gauge
    New
  • Grid
    New
  • Group
  • Input
  • Input Group
  • Input OTP
    New
  • Input Payment
    New
  • Input Phone
    New
  • Input Sensitive
    New
  • Kbd
  • Kinetic Click
    New
  • Label
  • List Box
    New
  • Loader
  • Marker
    New
  • Menu
  • Menubar
  • Message
    New
  • Meter
  • Morphic Toast
    New
  • Navigation Menu
  • Number Field
  • Option Picker
    New
  • Orb
    New
  • Pagination
  • Popover
  • Preview Card
  • Progress
  • Radio
  • Resizable
    New
  • Ruler Picker
    New
  • Scroll Area
  • Scroll Bar
    New
  • Select
  • Separator
  • Sidebar
  • Skeleton
  • Slider
    Updated
  • Sortable
    New
  • Switch
    Updated
  • Table
  • Tabs
  • Text
    New
  • Textarea
  • Timeline
    New
  • Toast
  • Toggle
  • Toggle Group
  • Toolbar
  • Tooltip
    Updated
  • Waveform
    New
  • Wheel Picker
    New
/
/

Loading...

Preview Skeleton

Installation Skeleton

Usage Skeleton

API Reference Skeleton

Sponsors

Support the development of XiodUI and help us build the best component library on Earth.

+++
Sponsor on GitHub

Radio

Previous: ProgressNext: Resizable

A set of checkable buttons, known as radio buttons.

Preview

Loading Preview...

Installation

bun add xiod-ui

Usage

Imports

1import {2  Radio,3  RadioGroup,4  RadioGroupItem,5  RadioItem6} from "xiod-ui/radio";

Anatomy

1<Radio>2  <RadioGroup>3    <RadioGroupItem />4    <RadioItem />5  </RadioGroup>6</Radio>

API Reference

Detailed documentation of properties and options.

Radio

PropTypeDefaultDescription
disabled
boolean
|undefined
falseWhether the component should ignore user interaction.
readOnly
boolean
|undefined
falseWhether the user should be unable to select a different radio button in the group.
required
boolean
|undefined
falseWhether the user must choose a value before submitting a form.
name
string
|undefined
-Identifies the field when a form is submitted.
form
string
|undefined
-Identifies the form that owns the radio inputs. Useful when the radio group is rendered outside the form.
value
any
-The controlled value of the radio item that should be currently selected. To render an uncontrolled radio group, use the `defaultValue` prop instead.
defaultValue
any
-The uncontrolled value of the radio button that should be initially selected. To render a controlled radio group, use the `value` prop instead.
onValueChange
((value: any, eventDetails: { reason: "none"; event: Event; cancel: () => void; allowPropagation: () => void; isCanceled: boolean; isPropagationAllowed: boolean; trigger: Element
|undefined; }) => void)
|undefined
-Callback fired when the value changes.
inputRef
Ref<HTMLInputElement>
|undefined
-A ref to access the hidden input element.
style
CSSProperties
|((state: RadioGroupState) => CSSProperties
|undefined)
|undefined
-Style applied to the element, or a function that returns a style object based on the component's state.
className
string
|((state: RadioGroupState) => string
|undefined)
|undefined
-CSS class applied to the element, or a function that returns a class based on the component's state.
render
ReactElement<unknown, string
|JSXElementConstructor<any>>
|ComponentRenderFn<HTMLProps, RadioGroupState>
|undefined
-Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a `ReactElement` or a function that returns the element to render.

RadioItem

PropTypeDefaultDescription
valueReq
any
-The unique identifying value of the radio in a group.
disabled
boolean
|undefined
-Whether the component should ignore user interaction.
required
boolean
|undefined
-Whether the user must choose a value before submitting a form.
readOnly
boolean
|undefined
-Whether the user should be unable to select the radio button.
inputRef
Ref<HTMLInputElement>
|undefined
-A ref to access the hidden input element.
nativeButton
boolean
|undefined
trueWhether the component renders a native `<button>` element when replacing it via the `render` prop. Set to `false` if the rendered element is not a button (for example, `<div>`).
style
CSSProperties
|((state: RadioRootState) => CSSProperties
|undefined)
|undefined
-Style applied to the element, or a function that returns a style object based on the component's state.
className
string
|((state: RadioRootState) => string
|undefined)
|undefined
-CSS class applied to the element, or a function that returns a class based on the component's state.
render
ReactElement<unknown, string
|JSXElementConstructor<any>>
|ComponentRenderFn<HTMLProps, RadioRootState>
|undefined
-Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a `ReactElement` or a function that returns the element to render.
variant
"default"
|"expressive"
|"sharp"
|"diamond"
|null
|undefined
default
ProgressResizable