Skip to main content

Interface: ToggleButtonOwnProps

Defined in: components/ToggleButton/ToggleButton.tsx:119

ToggleButton props except the labelling contract.

Extends

  • Omit<RACToggleButtonProps, "style" | "children" | "aria-label">

Properties

data-scope?

optional data-scope?: string

Defined in: components/ToggleButton/ToggleButton.tsx:145

Data scope identifier.

Default

'toggle-button'

evaluation?

optional evaluation?: "primary" | "secondary" | "accent" | "muted" | "negative"

Defined in: components/ToggleButton/ToggleButton.tsx:128

Semantic emphasis. secondary is the default — a toolbar toggle is ambient chrome; muted gives the quiet posture (no fill until hovered).

Default

'secondary'

icon?

optional icon?: ReactElement<IconProps, string | JSXElementConstructor<any>>

Defined in: components/ToggleButton/ToggleButton.tsx:135

An <Icon> element naming the glyph by intent. Omit children for the icon-only form — the dominant shape for a toolbar toggle ("Bold", "Grid view"): the button becomes a square and aria-label becomes required by the type system.


iconPlacement?

optional iconPlacement?: ActionIconPlacement

Defined in: components/ToggleButton/ToggleButton.tsx:140

Which side of the label the icon sits on.

Default

'leading'