ToggleGroupControlOption Edit

This feature is still experimental. “Experimental” means this is an early implementation subject to drastic and breaking changes.

ToggleGroupControlOption is a form component and is meant to be used as a child of ToggleGroupControl.

Usage Usage

import {
    __experimentalToggleGroupControl as ToggleGroupControl,
    __experimentalToggleGroupControlOption as ToggleGroupControlOption,
} from '@wordpress/components';

function Example() {
    return (
        <ToggleGroupControl label="my label" value="vertical" isBlock>
            <ToggleGroupControlOption value="horizontal" label="Horizontal" />
            <ToggleGroupControlOption value="vertical" label="Vertical" />

Top ↑

Props Props

label: string label: string

Label for the option. If needed, the aria-label prop can be used in addition to specify a different label for assistive technologies.

  • Required: Yes

Top ↑

value: string | number value: string | number

The value of the ToggleGroupControlOption.

  • Required: Yes