Nware Soma UI components for the Nware platform

Cortex thinks, Axon acts — Soma is what you see.

Vanilla zero-dependency JS and Sass-authored CSS, designed for server-rendered pages: markup uses static soma-* classes, behaviour attaches via auto-init on DOMContentLoaded or the imperative Soma.* API. Delivered as a flatpack (dist/soma.css + dist/soma.js / soma.umd.cjs). Start with Getting started.

Three themes (light, dark, high-contrast), three density modes (comfortable, cosy, compact) and RTL all switch via attributes on <html>; cycle them with the corner buttons. Every component page pairs a captioned live demo of each variant with syntax-highlighted HTML/CSS/JS code blocks (hover a block for its copy button). The machine-readable contract is llms.txt, rendered for humans on the reference page.

About the name

The Soma logomark: dendrites feeding a double-ring cell body, an axon leaving it Soma is the neuron's cell body: the visible integrating center that receives what the dendrites carry in and hands the result to the axon. That is the library's role in the Nware ecosystem, whose sandbox units are literally called neurons, and whose siblings are Cortex and Axon: Cortex thinks, Axon acts — Soma is what you see. Pronunciation: SOH-mə (IPA /ˈsoʊmə/), two syllables, stress on the first.

The name takes one canonical form per surface:

FormValue
ProseNware Soma
npm@nware/soma
CSS prefixsoma-
JS APISoma.*

Who Soma is for

The docs and component surface are designed for two audiences in parallel:

Human developers

Frontend and full-stack engineers building on the Nware platform (nware-portal and its plugins), or on any server-rendered app that wants a modern UI without a React or Vue rewrite. Every component page has a Summary, When to use, captioned live Examples for every variant, copy-paste HTML, a CSS classes table, and the JavaScript API, plus Integration for wiring Soma into a living app, docs search, and the one-page kitchen sink.

AI coding agents

Claude Code, Codex, Gemini, and similar coding assistants use this sandbox as their reference surface when generating code that targets Soma. A machine-readable llms.txt at the site root indexes every component's markup contract, JS API, events, design-token vocabulary, and the rules agents must follow. The reference page renders the same file for human review.

Both audiences share the same rule: use Soma.* and soma-* only. Soma is greenfield: there are no aliases, no legacy spellings, and no compatibility layer, so the canonical names are the whole vocabulary.

Foundations

Components

Every component has a dedicated page: summary, when to use, captioned live examples with code blocks, CSS classes, and the JavaScript API.

Guides

Component matrix

The full component surface at a glance. Since is the release that introduced the component — everything to date lands in 0.1.0, the first release (in preparation). Kind: CSS = markup-only (no behaviour to attach), CSS + JS = styled markup plus attached behaviour, JS = the component builds its own DOM and exists only through its API. Auto-init is the literal selector wired up on DOMContentLoaded — "imperative" components are created by calling their API.

ComponentKindJS APIAuto-initSince
AvatarsCSS0.1.0
BadgesCSS0.1.0
BannersCSS + JSSoma.banner.soma-banner (wires the optional .soma-banner-close)0.1.0
ButtonsCSS0.1.0
ChartsCSS0.1.0
ComboboxJSSoma.comboboximperative0.1.0
Date pickerCSS + JSSoma.datePicker / Soma.dateRange.soma-date-picker-input0.1.0
DialogsCSS + JSSoma.dialog2imperative0.1.0
DiffCSS0.1.0
DrawerCSS + JSSoma.drawerimperative0.1.0
DropdownsCSS + JSSoma.dropdown2.soma-dropdown2-trigger[aria-controls]0.1.0
DropzoneCSS + JSSoma.dropzone.soma-dropzone (containing a file input)0.1.0
Empty statesCSS0.1.0
ExpanderCSS + JSSoma.expander.soma-expander-trigger[aria-controls]0.1.0
Filter chipsCSS0.1.0
FormsCSS0.1.0
IconsCSS0.1.0
Inline dialogCSS + JSSoma.inlineDialog.soma-inline-dialog-trigger[aria-controls]0.1.0
Key-value listCSS0.1.0
LabelsCSS0.1.0
List groupCSS0.1.0
Log viewerCSS0.1.0
MessagesCSS + JSSoma.message + .create.soma-message (close wiring)0.1.0
MeterCSS0.1.0
NavbarCSS + JSSoma.responsiveNavbar.soma-navbar[data-soma-responsive]0.1.0
NavigationCSS + JSSoma.breadcrumbs.soma-breadcrumbs[data-soma-collapse]0.1.0
Command paletteJSSoma.paletteimperative0.1.0
PageCSS0.1.0
Page headerCSS0.1.0
Page layoutCSS0.1.0
ProgressCSS + JSSoma.progressimperative0.1.0
QuicksearchCSS + JSSoma.quicksearch.soma-quicksearch0.1.0
RESTful tableCSS + JSSoma.restfulTableimperative0.1.0
SelectCSS + JSSoma.select2imperative0.1.0
ShellCSS + JSSoma.sidebarResize (imperative)[data-soma-sidebar-toggle], .soma-sidebar-group-toggle[aria-controls]0.1.0
SkeletonCSS0.1.0
SpinnerCSS + JSSoma.spinner / Soma.spinnerStopimperative0.1.0
Stat tilesCSS0.1.0
TablesCSS + JSSoma.sortableTabletable.soma-table-sortable0.1.0
TabsCSS + JSSoma.tabs.soma-tabs:not(.soma-tabs-disabled)0.1.0
TimelineCSS0.1.0
ToastsJSSoma.toastimperative0.1.0
ToolbarCSS0.1.0
TooltipsCSS + JSSoma.tooltip[data-soma-tip] (the CSS-only data-soma-tooltip needs no JS)0.1.0
TreeCSS + JSSoma.tree.soma-tree0.1.0
TypographyCSS0.1.0
WidgetsCSS0.1.0

Beyond components, the library-level APIs are Soma.theme (Themes), Soma.i18n (i18n) and Soma.shortcuts (Keyboard shortcuts).