Skip to content
API reference

components/radio-group

Import
import * as api from "@fungi.computer/caps/components/radio-group";
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”
Signature
type RadioGroupProps = object &
Omit<
FieldsetHTMLAttributes<HTMLFieldSetElement>,
"defaultValue" | "onChange"
>;

Props accepted by RadioGroup.

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”
Signature
type RadioGroupItemProps = object &
Omit<
InputHTMLAttributes<HTMLInputElement>,
"checked" | "defaultChecked" | "name" | "type" | "value"
>;

Props accepted by RadioGroupItem.

Name Type Description
value string -
indicator? ReactNode Replaces the bead while the native input continues to own selection.

RadioGroupCardPropstype alias

Section titled “RadioGroupCardProps”
Signature
type RadioGroupCardProps = object & RadioGroupItemProps;

Props accepted by RadioGroupCard.

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”
Signature
const RadioGroup: ForwardRefExoticComponent<
object &
Omit<
FieldsetHTMLAttributes<HTMLFieldSetElement>,
"defaultValue" | "onChange"
> &
RefAttributes<HTMLFieldSetElement>
>;

A radio-group primitive with caller-owned selection state.


RadioGroupItemconstant

Section titled “RadioGroupItem”
Signature
const RadioGroupItem: ForwardRefExoticComponent<
object &
Omit<
InputHTMLAttributes<HTMLInputElement>,
"name" | "defaultChecked" | "type" | "value" | "checked"
> &
RefAttributes<HTMLInputElement>
>;

A selectable item in a RadioGroup.


RadioGroupCardconstant

Section titled “RadioGroupCard”
Signature
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.