XiodUI
HomeDocs
OverviewComponentsStyling & CustomizationChangelog

Components

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

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

Checkbox

Previous: CarouselNext: Circular Progress

A box the user can check or uncheck, with an indeterminate state.

Preview

Loading Preview...

Installation

bun add xiod-ui

Usage

Imports

1import { Checkbox, CheckboxGroup } from "xiod-ui/checkbox";

API Reference

Detailed documentation of properties and options.

Checkbox

alias: CheckboxGroupItem

Accepts className, style and render, plus every native attribute of the element it renders.

PropTypeDefaultDescription
checked
boolean
undefined

Whether the checkbox is currently ticked.

To render an uncontrolled checkbox, use the defaultChecked prop instead.

defaultChecked
CarouselCircular Progress
boolean
false

Whether the checkbox is initially ticked.

To render a controlled checkbox, use the checked prop instead.

disabled
boolean
false

Whether the component should ignore user interaction.

form
string
–

Identifies the form that owns the hidden input. Useful when the checkbox is rendered outside the form.

id
string
–

The id of the input element.

indeterminate
boolean
false

Whether the checkbox is in a mixed state: neither ticked, nor unticked.

inputRef
Ref<HTMLInputElement>
–

A ref to access the hidden <input> element.

name
string
undefined

Identifies the field when a form is submitted.

nativeButton
boolean
false

Whether the component renders a native <button> element when replacing it via the render prop. Set to true if the rendered element is a native button.

onCheckedChange
((checked: boolean, eventDetails: CheckboxRootChangeEventDetails) => void)
–

Event handler called when the checkbox is ticked or unticked.

parent
boolean
false

Whether the checkbox controls a group of child checkboxes.

Must be used in a [Checkbox Group](https://base-ui.com/react/components/checkbox-group).

readOnly
boolean
false

Whether the user should be unable to tick or untick the checkbox.

required
boolean
false

Whether the user must tick the checkbox before submitting a form.

uncheckedValue
string
–

The value submitted with the form when the checkbox is unchecked. By default, unchecked checkboxes do not submit any value, matching native checkbox behavior.

value
string
–

The checkbox's value. Identifies it within a [Checkbox Group](https://base-ui.com/react/components/checkbox-group), falling back to name when omitted. When submitting a form, a checked box submits value; with no value, it submits the native "on".

variant
"default"|"diamond"|"expressive"|"sharp"
default

The visual style of the component.

CheckboxGroup

Accepts className, style and render, plus every native attribute of the element it renders.

PropTypeDefaultDescription
allValues
string[]
–

Names of all checkboxes in the group. Use this when creating a parent checkbox.

defaultValue
string[]
–

Names of the checkboxes in the group that should be initially ticked.

To render a controlled checkbox group, use the value prop instead.

disabled
boolean
false

Whether the component should ignore user interaction.

onValueChange
((value: string[], eventDetails: CheckboxGroupChangeEventDetails) => void)
–

Event handler called when a checkbox in the group is ticked or unticked. Provides the new value as an argument.

value
string[]
–

Names of the checkboxes in the group that should be ticked.

To render an uncontrolled checkbox group, use the defaultValue prop instead.