Skip to main content

Toggle

An inline switch between two labeled values. Arrows or Space flip, the first letter of each label sets the choice directly, Enter accepts. The first option is shown by default; pass default (an option value) to start on a specific one instead.

$p->toggle('telemetry', 'Telemetry')->options(['enabled' => 'Enabled', 'disabled' => 'Disabled'])->default('enabled');
ANSINo ANSI
UnicodeToggle: Unicode + ANSIToggle: Unicode + No ANSI
ASCIIToggle: ASCII + ANSIToggle: ASCII + No ANSI