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.1.0
v0.1.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 one selected value, such as Day / Week / Month.

Default
Formatting toolbar
View options
Vertical
Deactivate Rename Duplicate
Delete
New state Toggle autoplay
B I U
HTML CSS

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.

Replace Patch

Signals

Datastar signals declared in the selected state's markup. Change a value to drive 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 four 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.

B I U

View options#

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

Wrap Map Guides

Vertical#

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

Grid Snap Rulers

Settings

Theme

Default Sunshine Ocean Matrix Rose

Accessibility

Playgrounds

Server Simulator