A wider screen, please

This page features interactive demos and side-by-side code samples that need at least 340 pixels of horizontal space. Please widen your browser window, or rotate your device, to continue.

Morpheus v0.3.0
v0.3.0

Toggle group#

Component <neo-toggle-group> is a cluster of <neo-toggle>  children sharing a selection model. Each child toggle remains independent. The group value is a comma-separated list of the pressed child values. For singular segmented choices, use <neo-buttongroup> .

Use toggle group for independent on/off controls, such as Bold + Italic. Use button group for a single selected value, such as Day / Week / Month.

Default
Formatting toolbar
View options
Vertical
DeactivateRenameDuplicate
Delete
New state Toggle autoplay
B I U
HTMLCSS

The selected state's markup and its scoped CSS. The CSS is wrapped in <style>@scope { ... }</style> and applies to the preview only. Edits change the preview above, applied live while Sync is on, or when you click Patch or Replace. Patch morphs the preview; Replace swaps it outright.

ReplacePatch

Signals

Datastar signals declared in the selected state's markup. Change a value to update the preview, applied live while Sync is on, or when you click Patch.

Patch

Reference#

Attributes #

NameTypeDefaultDescription
valuestring reflected observed""Comma-separated active child values. A child value must not contain a comma; the separator is unescaped. Use neo-buttongroup for a single selected value.
orientation"horizontal" | "vertical"horizontalLayout axis only. All 4 arrow keys move focus regardless of orientation.

Events #

NameDetailBubblesDescription
neo-toggle-group-change{ value: string, values: string[] }yesFires after the selection changes.

Examples#

Formatting toolbar#

Each toggle flips independently; the group's value is a comma-separated list of the pressed children's own value attributes.

BIU

View options#

The group allows any combination of values. For exclusive choices, use <neo-buttongroup> .

WrapMapGuides

Vertical#

orientation="vertical" only changes layout; selection semantics are unchanged and any of the 4 arrow keys move focus.

GridSnapRulers

Settings

Theme

DefaultSunshineOceanMatrixRose☀ ◐ ☾

Accessibility

Playgrounds

Server Simulator