Feather 1

Mor, Manarp's design system

Semantic HTML, CSS and a little JavaScript. No dependencies, no build step, under 10KB. Write plain HTML and it already looks like Manarp.

Install

One stylesheet and one module. The script only adds behavior; everything still renders without it.

npm install @manarp/mor
<link rel="stylesheet" href="node_modules/@manarp/mor/dist/mor.min.css">
<script type="module" src="node_modules/@manarp/mor/dist/mor.js"></script>
// Or from a bundler
import "@manarp/mor/mor.min.css";
import { toast } from "@manarp/mor";

Principles

Semantic firstA plain <button>, <input> or <table> is styled with no classes. Classes only choose variants.
Native first<dialog>, popover, <details> and form controls do the work. JS only fills the gaps.
Top layerModals, popovers, menus, tooltips and toasts render above everything, positioned against the window.
AccessibleWAI-ARIA patterns, keyboard support, visible focus and AA contrast in light and dark.

Foundations

Colors

Ink and brass. Every color is a variable that switches with light and dark mode; override any of them to theme.

Background--mor-bg
Surface--mor-surface
Tint--mor-tint
Text--mor-text
Muted--mor-muted
Brass--mor-brass
Success--mor-success
Error--mor-error

Typography

System fonts in two weights. Headings, text, lists, quotes and code need no classes.

Heading one

Heading two

Heading three

Body text with strong, emphasis, a link, inline code, a highlight and ⌘ K.

Small things, made with care.
  • A list item
  • Another item
Small print for hints and captions.

Layout

.container centers content. .stack spaces children vertically, .cluster wraps them in a row, and .grid makes equal columns that wrap. Set spacing with --gap and column width with --min.

One
Two
Three

Components

Buttons

Any <button> is a primary pill. Variants .secondary, .ghost, .danger; sizes .small, .large; aria-busy="true" for loading. Links that look like buttons use class="button".

Link button

Forms

Labels, inputs, selects and choices are classless. For a hint or error, wrap the label, control and <small> in .field and link them with aria-describedby; errors set aria-invalid="true". A switch is a checkbox with role="switch".

Enter a valid email address.
Optional. Up to 500 characters.
Notifications
Billing

Cards

.card with an optional <header> and <footer>. .card.tint marks featured content; a.card makes the whole card a link.

Plain card

For everything else

White surface, hairline border, no shadow.

Featured

Tinted with Cloud

Use it sparingly, for the one thing that matters.

Link cardThe whole card is clickable.

Badges

.badge for status and labels. .brass is for milestones.

DraftFeather 1LiveFailedNew

Alerts

Inline messages. Use role="status"; keep role="alert" for urgent errors only.

Heads up

Your trial ends in 3 days.

Published

Feather 1 is live.

Milestone

You shipped your tenth release.

Tables

Classless tables. Wrap wide ones in .table-wrap so they scroll in their own box; .number right-aligns figures.

ProductStatusReleaseUsers
MorLiveFeather 11
Next appDraft-0
Shopify appPlanned-0
Manarp products

Avatars

An image or initials in .avatar; sizes .small and .large; stack them in .avatar-group.

KNKNKN
KNMR+3

Accordion

Native <details>. Give several the same name and only one opens at a time.

What is Mor?

Manarp's design system, named after the peacock.

Does it need a framework?

No. It is plain HTML, CSS and a little JavaScript.

How big is it?

Under 10KB gzipped, CSS and JS together.

Progress and meter

Native <progress> (leave out value for indeterminate) and <meter>, which turns brass and then red past its thresholds.

Spinner and skeleton

.spinner for short waits; .skeleton blocks hold the shape of content that is loading.

Tabs

The WAI-ARIA tabs pattern: arrow keys, Home and End move between tabs; only the selected tab is in the tab order.

Everything you need to start.

Divider and empty state

.divider labels a break; .empty fills a space that has nothing yet.

or

No products yet

Your first Feather is one click away.

Overlays

All overlays render in the browser's top layer and are positioned against the window, so a parent with overflow: hidden, a scroll box or a z-index can never clip or cover them.

Drawer

The same dialog with .drawer: from the right, .left, or .bottom as a sheet.

Filters

Share

Bottom sheets suit phones and quick choices.

Popover

Native popover with popovertarget: light dismiss and Escape come free. Mor anchors it to its button, flips it when there is no room and keeps it inside the window. Choose a side with data-placement.

Popover

Rich content, anchored to its button.

I open above when there is room.

Inside a small scroll box, it still escapes the box:

Not clipped by the box's overflow.

Tooltip

Add data-tooltip to any focusable element. It shows on hover and keyboard focus, hides on Escape, and is linked with aria-describedby. Choose a side with data-tooltip-placement.

Toast

Call mor.toast(message, { variant, duration }). Toasts stack in a polite live region, pause while hovered or focused, and sit above open modals.

Floating bar

A .floatbar pinned to the bottom of the window, for actions on a selection. Show and hide it with the hidden attribute.