Documentation
Feedback
Guides
Storefront Development

Storefront Development
Storefront development
RadioGroup

Allows users to select a single option from a list of two or more mutually exclusive options.

The RadioGroup allows users to select a single option from a list of two or more mutually exclusive options.
Example
Code

Usage

Import the component


_10
import { RadioGroup, RadioField } from '@faststore/ui'

Import styles

To apply styles, include the following in your stylesheet:

_10
@import '@faststore/ui/src/components/atoms/Radio/styles.scss'


_10
@import '@faststore/ui/src/components/molecules/RadioField/styles.scss'


Data attributes

You can target and override RadioGroup styles using the following data attributes:
data-fs-radio-group-option

Props

NameTypeDescriptionDefault
name*stringName to link children by context.
selectedValuestring | numberValue of checked child.
onChangeChangeEventHandler<HTMLInputElement>Function that is triggered when any children is checked.
Contributors
3
Photo of the contributor
Photo of the contributor
Photo of the contributor
Was this helpful?
Yes
No
Suggest Edits (GitHub)
Contributors
3
Photo of the contributor
Photo of the contributor
Photo of the contributor
On this page