Skip to content
BigBang

Popular

    ↑↓Navigate↵OpenEscClose
    TR

    Components

    RadioGroup

    Gathers options that exclude each other under one legend and allows exactly one choice.

    Storybook
    Storybook
    Source
    Source

    Use RadioGroup when two to about seven options exclude each other and all of them must stay visible: delivery method, display preference, frequency.

    • For several choices: Use a CheckboxGroup.
    • For long lists: Over seven options, use a Select.
    • For a view choice that takes effect at once: Use a ToggleGroup.
    Group label
    Option description goes here.
    Option description goes here.
    import { Radio, RadioGroup } from '@bigbang/ui';
    export default function WithDescriptions() {
    return (
    <RadioGroup label="Group label" defaultValue="one">
    <Radio value="one" label="First option" description="Option description goes here." />
    <Radio value="two" label="Second option" description="Option description goes here." />
    </RadioGroup>
    );
    }
    1. Legend: <legend>; label-md, with the necessity marker when needed.
    2. Circle: 16 px (radio-size), fully round.
    3. Dot: 6 px on the selected item, 3/8 of the circle.
    4. Label and description: a body-md label, a body-sm description.
    5. Error: error; under the items.
    • Selecting an item clears the previous choice; the choice changes only by selecting another item.
    • Clicking the label selects the item too.
    • The selected value is submitted with the form under name.
    • error makes the group and every item invalid.
    • Order the options meaningfully; put the most likely one first.
    • Preselect an option when the user may go on without choosing.
    • When a choice must be undone, add an explicit option such as “None”.
    • The legend is a short noun phrase or a question.
    • Labels share the same grammatical form and have no full stop.
    Turkish English
    Bir seçenek seçin. Choose one option.
    Devam etmek için bir seçenek seçin. Choose an option to continue.