Custom label to be used by screen readers. When provided, an aria-label will be added to the element.
string"a user friendly label for screen readers"
Function that will be called to render the visual representation.
functionIt will be passed an object indicating whether the button is checked. It should return a react element.
({ checked }) => <Box>...</Box>Same as React <input disabled={} />. Also adds a hidden input element with the same name so form submissions work.
booleantrue
false
At its core, the RadioButton component is a regular <input> element. Thus, both DOM and React properties, methods, and events are accessible. To read up on all of the possible DOM attributes and types available for input elements, check out this MDN Web Documents page. To learn more about DOM events and methods, you can read more on the MDN Web Events documentation page.
Also, feel free to read about the types of React events available, or see how DOM attributes change in React. Working in tandem with Styled Components, you also have access to the as property.
The default color of the border surrounding the checked icon in RadioButton checked state.
stringA hex, name, or rgb value.
"brand"
objectAn object with a color for dark and light modes.
{ dark: "graph-0", light: "brand" }The color of the border of the Radio Button.
stringA hex, name, or rgb value.
"brand"
objectAn object with a color for dark and light modes.
{ dark: "rgba(255, 255, 255, 0.5)", light: "rgba(0, 0, 0, 0.15)" }The background color of the RadioButton.
stringA hex, name, or rgb value.
"brand"
objectAn object with a color for dark and light modes.
{ dark: "string", light: "string" }The background color of the RadioButton when checked.
stringA hex, name, or rgb value.
"brand"
objectAn object with a color for dark and light modes.
{ dark: "string", light: "string" }The color of the checked icon in the RadioButton.
stringA hex, name, or rgb value.
"brand"
objectAn object with a color for dark and light modes.
{ dark: "string", light: "string" }Any additional style for the checked RadioButton.
stringAny CSS.
css`color: 'blue'`
function(props) => {}The color of the border surrounding the checked icon in RadioButton checked state.
stringA hex, name, or rgb value.
"brand"
objectAn object with a color for dark and light modes.
{ dark: "string", light: "string" }Any additional style for the container around the radio button and its label.
stringAny CSS.
css`color: 'blue'`
function(props) => {}Any additional style for the radio button itself.
stringAny CSS.
css`color: 'blue'`
function(props) => {}The background color of the Box surrounding the RadioButton when hovered over.
stringA hex, name, or rgb value.
"brand"
objectAn object with a color for dark and light modes.
{ dark: "string", light: "string" }The color of the RadioButton border when hovered over.
stringA hex, name, or rgb value.
"brand"
objectAn object with a color for dark and light modes.
{ dark: "white", light: "black" }Any additional style for the RadioButton icon.
stringAny CSS.
css`color: 'blue'`
function(props) => {}