Skip to content

@gtkx/react / ToggleProps

Type Alias: ToggleProps

ToggleProps = object

Defined in: packages/react/src/jsx.ts:550

Props for the Toggle virtual element.

Used to declaratively add toggles to an AdwToggleGroup.

Example

tsx
<AdwToggleGroup>
    <x.Toggle id="view-list" iconName="view-list-symbolic" />
    <x.Toggle id="view-grid" iconName="view-grid-symbolic" />
    <x.Toggle id="view-flow" label="Flow" />
</AdwToggleGroup>

Properties

enabled?

optional enabled?: boolean

Defined in: packages/react/src/jsx.ts:560

Whether the toggle is enabled


iconName?

optional iconName?: string | null

Defined in: packages/react/src/jsx.ts:556

Icon name to display


id?

optional id?: string | null

Defined in: packages/react/src/jsx.ts:552

Optional identifier for accessing toggle by id instead of index


label?

optional label?: string | null

Defined in: packages/react/src/jsx.ts:554

Label text to display


tooltip?

optional tooltip?: string

Defined in: packages/react/src/jsx.ts:558

Tooltip text (supports Pango markup)


useUnderline?

optional useUnderline?: boolean

Defined in: packages/react/src/jsx.ts:562

Whether underline in label indicates mnemonic