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
Morpheus Getting started Settings

Getting started#

Morpheus is a server-driven web components UI kit built around Go, templ, and Datastar. Components are plain custom elements that emit DOM events and expose attribute hooks, so they will slot into other stacks too, but the path of least resistance, and the one every demo on this site walks, is the one shown below.

Install#

Two pieces: the static assets the browser loads, and the Go module that gives you templ helpers like neo.Select or datastar.ComboboxAsync.

Static assets#

Three files: morpheus.css, one theme stylesheet (e.g. theme-default.css), and the component bundle bundle.js. jsDelivr serves every tagged release straight from the repository, so load them in your page head:

Pin the tag, as above. jsDelivr also accepts floating refs such as @latest and partial versions; those resolve to the newest matching tag, so they pull in breaking changes.

To self-host instead, take the same files from /min/ or from a release and serve them yourself.

The kit reads :root custom properties of colours and shape: the theme stylesheet (theme-default.css ships in light + dark) sets them. See the Theming page on the full variable list and how to author custom palettes.

Go module#

To use the kit in a Go + templ project, add the helper packages to your module:

neo exposes one templ per component (neo.Select, neo.Combobox, neo.Button, …). datastar wraps the async-aware components (datastar.ComboboxAsync, datastar.PopoverAsync) with the SSE retry protocol pre-wired.

Settings

Theme

Default Sunshine Ocean Matrix Rose

Accessibility

Playgrounds

Server Simulator