Read page as text

NIB / PLAYGROUND

Toggle group playground — NibComponents

Try toggle group in Flutter. Press one style or combine several without inventing a controller.

Open interactive view

Press one style or combine several without inventing a controller.

Read the full component guide and API

Public widgets and APIs

  • NibToggleGroup
  • NibToggleOption

Example Dart code

NibToggleGroup<String>(
  options: const [NibToggleOption(value: 'bold', label: 'Bold'),
    NibToggleOption(value: 'italic', label: 'Italic')],
  value: style, onChanged: (next) => setState(() => style = next),
)

Playground controls

ControlTypeOptions or rangeHelp
Animate feedbacktoggle
Disabledtoggle
Multiple selectiontoggle
Vertical layouttoggle