Skip to content

TsaiSwitch

A controlled binary switch with an optional label, description, focus callback, and configurable label position.

Open live example

TsaiSwitch(
  value: notificationsEnabled,
  label: 'Notifications',
  description: 'Receive operational alerts',
  onChanged: (value) => setState(() => notificationsEnabled = value),
)

Set onChanged to null for a disabled switch. Provide semanticLabel when the visible label does not describe the setting independently.