Radio Button
Radio buttons are used for mutually exclusive choices, not for multiple choices. Only one radio button can be selected at a time. When a user chooses a new item, the previous choice is automatically deselected.
Figma Link
- Web Components
- Flutter
Demo
zeta-web v0.11.0
Web Components
Storybook
https://design.zebra.com/web/storybook/?path=/docs/components-radio-button--docs
Inherited Attributes
Name | Description | Type | Default | Inherited From |
---|---|---|---|---|
autoCapitalize | Whether inputted text is automatically capitalized and how. Only takes effect on non-keyboard entry | "none" | "off" | "sentences" | "on" | "words" | "characters" | undefined | undefined | BaseToggleFormElement |
autoComplete | AutoFill | undefined | undefined | BaseToggleFormElement | |
name | The name of the form control. | string | "" | BaseToggleFormElement |
id | The id of the form control. | string | "" | BaseToggleFormElement |
required | Indicates whether the form control is required to be filled out before submitting the form. | boolean | false | BaseToggleFormElement |
value | The value of the Form Control that is submitted when part of a form. | string | null | null | BaseToggleFormElement |
checked | The state of the Switch or Checkbox that is submitted when part of a form. | boolean | undefined | BaseToggleFormElement |
indeterminate | The state of the Switch or Checkbox defined by a mixed or unknown state. | boolean | false | BaseToggleFormElement |
placeholder | Placeholder text shown when value is empty. | string | undefined | undefined | BaseToggleFormElement |
min | The minimum value for number inputs | number | undefined | undefined | BaseToggleFormElement |
max | The maximum value for number inputs | number | undefined | undefined | BaseToggleFormElement |
readOnly | Placeholder text shown when value is empty. | boolean | undefined | undefined | BaseToggleFormElement |
spellCheck | Whether to spellcheck the input | boolean | "default" | undefined | undefined | BaseToggleFormElement |
disabled | Boolean for if component is disabled.This will apply disabled styles. | boolean | false | BaseToggleFormElement |
tabIndex | The tab index of the component, used to determine the order in which elements receive focus when the user navigates through the document by pressing the Tab key. | number | 0 | BaseToggleFormElement |
rounded | Whether the component is rounded or sharp.When true, rounded will set the border radius of the first child, and any children with class 'contourable-target' to --radius-minimal .Otherwise, this value will be --radius-none . | boolean | undefined | true | BaseToggleFormElement |
Demo
Widgetbook
https://design.zebra.com/flutter/widgetbook/index.html#/?path=components/radio/zetaradio/radio
Inheritance
Object
> DiagnosticableTree
> Widget
> StatefulWidget
> ZetaStatefulWidget
Constructors
Constructor for ZetaRadio.
ZetaRadio.new({Key? key, bool? rounded, required T value, T? groupValue, ValueChanged<T?>? onChanged, Widget? label})
Properties
Name | Description | Type | Features |
---|---|---|---|
groupValue | The selected value among all possible options. | T? | final |
hashCode | The hash code for this object. | int | no setter inherited |
key | Controls how one widget replaces another widget in the tree. | Key? | final inherited |
label | The label which appears next to the Radio Button, on the right side. | Widget? | final |
onChanged | Callback function to call when the Radio Button is tapped. | ValueChanged<T?>? | final |
rounded | Sets rounded or sharp border of the containing box and the icon style. | bool? | final inherited |
runtimeType | A representation of the runtime type of the object. | Type | no setter inherited |
value | The value of the option, which can be selected by this Radio Button. | T | final |