RadioGroup

Component used when only one choice may be selected in a series of options

  • Name@spark-ui/radio-group
    Version2.1.2
    LicenseMIT
    npmgithubReported IssuesReport a bug
  • RadioGroup#

    Contains all the parts of a radio group.

    AttributeTypeDescriptionDefault
    asChildbooleanChange the component to the HTML tag or custom component of the only child.null
    defaultValuestringThe value of the radio item that should be checked when initially rendered. Use when you do not need to control the state of the radio items.null
    valuestringThe controlled value of the radio item to check. Should be used in conjunction with onValueChange.null
    onValueChange(value: string) => voidEvent handler called when the value changes.null
    disabledbooleanWhen true, prevents the user from interacting with radio items.null
    namestringThe name of the group. Submitted with its owning form as part of a name/value pair.null
    requiredbooleanWhen true, indicates that the user must check a radio item before the owning form can be submitted.null
    orientation"horizontal" | "vertical"The orientation of the component.null
    dir"ltr" | "rtl"The reading direction of the radio group.null
    loopbooleanWhen true, keyboard navigation will loop from last item to first, and vice versa.null
    intent"main" | "support" | "accent" | "basic" | "success" | "alert" | "error" | "info" | "neutral"-null

    RadioGroup.Radio#

    An item in the group that can be checked.

    AttributeTypeDescriptionDefault
    asChildbooleanChange the component to the HTML tag or custom component of the only child.null
    value*stringThe value given as data when submitted with a name.null
    disabledbooleanWhen true, prevents the user from interacting with the radio item.null
    requiredbooleanWhen true, indicates that the user must check the radio item before the owning form can be submitted.null
    intent"main" | "support" | "accent" | "basic" | "success" | "alert" | "error" | "info" | "neutral"-null