Documentation
Feedback
Guides
Storefront Development

Storefront Development
Storefront development
RadioField

Groups a Radio input and its corresponding Label.

The RadioField wraps a Radio input and its corresponding Label. It allows users to select one option from a set.
Example
Code

Usage

Import the component


_10
import { 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';


Design tokens

Local tokenDefault value/Global token linked
--fs-radio-field-gapvar(--fs-spacing-1)

Data attributes

You can target and override RadioField styles using the following data attributes:
data-fs-radio-field

Props

NameTypeDescriptionDefault
testIdstringID to find this component in testing tools (e.g.: cypress, testing library, and jest).fs-radio-field
id*stringID to identify input and corresponding label.
label*string | number | false | true | {} | ReactElement<any, string | JSXElementConstructor<any>> | Iterable<ReactNode> | ReactPortalThe text or component displayed to identify the input radio.
valuestringThe value to identify the input radio.
namestringIdentify radio in the same group.
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