Agriculture Design System
Beta
Design System for the Export Service

Radio

Radios allow users to select one option from a list.

View in FigmaView in StorybookView in Github
import { ... } from '@ag.ds-next/react/radio';

Usage

Radio components can be imported via the radio entrypoint in the @ag.ds-next/react package.

For example:

import { ... } from '@ag.ds-next/react/radio';

Props

Radio Props
PropTypeDescription
aria-required?Booleanish
autoFocus?boolean
checked?boolean
children?ReactNode
disabled?boolean
id?string
invalid?boolean
If true, the invalid state will be rendered.
max?string | number
maxLength?number
min?string | number
minLength?number
name?string
onBlur?FocusEventHandler<HTMLInputElement>
onChange?ChangeEventHandler<HTMLInputElement>
pattern?string
ref?Ref<HTMLInputElement>
required?boolean
size?"md" | "sm"Default: "md"
The size of the input.
value?string | number | readonly string[]

Source

You can view the full source code for this package on Github.