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

Icon#

Component <neo-icon> is an inline SVG icon: the host pulls the configured icon set's SVG body in so stroke="currentColor" resolves against the parent's CSS color. Size from --neo-icon-size or width / height on the host. A neo-theme-change event re-fetches the glyph so a themed user sees the theme's own SVG, not the one the server inlined.

Default
Gallery
Sizes
Inherits text colour
In buttons
Inline in prose
Deactivate Rename Duplicate
Delete
New state Toggle autoplay
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
namestring observednoneIcon filename stem in the configured icon set (e.g. heart resolves to /static/icons/heart.svg).
basestring observednoneOverride the icon directory; defaults to the --neo-icon-base CSS custom property (which itself defaults to /static/icons).

Examples#

A sample of the bundled Lucide set. The full set lives under /static/icons/ as one SVG per name; drop new files in and the host picks them up without a rebuild.

Sizes#

The host reads --neo-icon-size as its width and height. Set the var inline (or on an ancestor) to scale the glyph without touching the SVG.

Inherits text colour#

Lucide glyphs use stroke="currentColor", so the icon inherits the parent's CSS color. Wrap the host in any coloured ancestor to retint it without writing variant-specific CSS.

In buttons#

Drop a <neo-icon> as the first child of <neo-button>. The button's flex layout supplies the gap, and the icon inherits the button's font colour so it retints with the variant.

Save Upgrade Delete Settings

Inline in prose#

The host is display: inline-flex with a 1em default size, so it sits on the text baseline and tracks the surrounding font size without nudging the line box.

Tap the   icon to open preferences, or pick   to save this article later. Press   to dismiss the dialog.

Settings

Theme

Default Sunshine Ocean Matrix Rose

Accessibility

Playgrounds

Server Simulator