API reference
components/radio-group
Import
Section titled “Import”import * as api from "@fungi.computer/caps/components/radio-group";Exports
Section titled “Exports”| Kind | Export | Description |
|---|---|---|
| type alias | RadioGroupProps | Props accepted by RadioGroup. |
| type alias | RadioGroupItemProps | Props accepted by RadioGroupItem. |
| type alias | RadioGroupCardProps | Props accepted by RadioGroupCard. |
| constant | RadioGroup | A radio-group primitive with caller-owned selection state. |
| constant | RadioGroupItem | A selectable item in a RadioGroup. |
| constant | RadioGroupCard | A radio choice presented as a card: bead, title, optional description and a trailing readout. The whole card is the hit area; the title names it. |
RadioGroupPropstype alias
Section titled “RadioGroupProps”type RadioGroupProps = object & Omit< FieldsetHTMLAttributes<HTMLFieldSetElement>, "defaultValue" | "onChange" >;Props accepted by RadioGroup.
Type Declaration
Section titled “Type Declaration”| Name | Type | Description |
|---|---|---|
children |
ReactNode |
- |
defaultValue? |
string |
- |
name? |
string |
- |
onValueChange()? |
(value) => void |
Called after the selected radio value changes. |
orientation? |
"horizontal" | "vertical" |
- |
value? |
string |
- |
RadioGroupItemPropstype alias
Section titled “RadioGroupItemProps”type RadioGroupItemProps = object & Omit< InputHTMLAttributes<HTMLInputElement>, "checked" | "defaultChecked" | "name" | "type" | "value" >;Props accepted by RadioGroupItem.
Type Declaration
Section titled “Type Declaration”| Name | Type | Description |
|---|---|---|
value |
string |
- |
indicator? |
ReactNode |
Replaces the bead while the native input continues to own selection. |
RadioGroupCardPropstype alias
Section titled “RadioGroupCardProps”type RadioGroupCardProps = object & RadioGroupItemProps;Props accepted by RadioGroupCard.
Type Declaration
Section titled “Type Declaration”| Name | Type | Description |
|---|---|---|
title |
ReactNode |
- |
description? |
ReactNode |
- |
meta? |
ReactNode |
A short readout on the card’s trailing edge, such as a price or size. |
RadioGroupconstant
Section titled “RadioGroup”const RadioGroup: ForwardRefExoticComponent< object & Omit< FieldsetHTMLAttributes<HTMLFieldSetElement>, "defaultValue" | "onChange" > & RefAttributes<HTMLFieldSetElement>>;A radio-group primitive with caller-owned selection state.
RadioGroupItemconstant
Section titled “RadioGroupItem”const RadioGroupItem: ForwardRefExoticComponent< object & Omit< InputHTMLAttributes<HTMLInputElement>, "name" | "defaultChecked" | "type" | "value" | "checked" > & RefAttributes<HTMLInputElement>>;A selectable item in a RadioGroup.
RadioGroupCardconstant
Section titled “RadioGroupCard”const RadioGroupCard: ForwardRefExoticComponent< object & object & Omit< InputHTMLAttributes<HTMLInputElement>, "name" | "defaultChecked" | "type" | "value" | "checked" > & RefAttributes<HTMLInputElement>>;A radio choice presented as a card: bead, title, optional description and a trailing readout. The whole card is the hit area; the title names it.