Skip to content

components/SwitchGlyph

import { … } from 'zidane-ui'ui/src/components/SwitchGlyph.tsx

Components#

SwitchGlyphComponent#

Renders the on/off glyph: a track with a thumb. It is decoration only (aria-hidden); the control around it owns the state and the semantics.

TypeScript
function SwitchGlyph(props: SwitchGlyphProps): Element
Parameters
NameTypeDescription
propsSwitchGlyphProps

Component props.

Element
SwitchGlyph props
NameTypeDescription
className?string

Extra classes on the root element.

onboolean

Whether the switch is on: the accent fill with the thumb at the right.

size?'sm' | 'md'

Glyph size: md for settings rows, sm for menu rows and compact toggles.

style?CSSProperties

Inline styles on the root element, merged after the component's own.

ui/src/components/SwitchGlyph.tsx:33

Interfaces#

SwitchGlyphPropsInterface#

Props for SwitchGlyph.

TypeScript
interface SwitchGlyphProps
SwitchGlyphProps properties
NameTypeDescription
className?string

Extra classes on the root element.

onboolean

Whether the switch is on: the accent fill with the thumb at the right.

size?'sm' | 'md'

Glyph size: md for settings rows, sm for menu rows and compact toggles.

style?CSSProperties

Inline styles on the root element, merged after the component's own.

ui/src/components/SwitchGlyph.tsx:16