shtukbase-ui-html: the component library
The Shtukbase components in plain HTML and CSS on the token contract: how a component is written, how controls become attributes, the card presets, what the demo shows.
The look of the package-map mock (29.11.2026) as components in plain HTML and CSS: the shadcn set and our own composites. A lens layout places the
generic sidebar, panels and page forms. The CSS reads only the token contract
(contract), so any style fits: shtukbase-style by default, any shadcn theme as well.
Open demo.html: the package map rebuilt from the components, then every component in every state and status and one picture per value of each control.
Use it on a page
<link rel="stylesheet" href="/design/shtukbase-style/tokens.css"> <!-- the style: the contract tokens -->
<link rel="stylesheet" href="/design/shtukbase-ui-html/ui.css"> <!-- the library -->
Copy the markup of a template from the component file; set controls as attributes.
A component
components/<level>/<id>/<id>.html holds the header (a YAML block in <!--- … --->: id, title, level, description, uses,
parts, states, status, controls, cssProperties), then one <template data-state="…"> per interaction state and one
<template data-status="…"> per data state. <id>.css is next to it. ui.css is all of them joined by build.
- Root:
data-slot="<id>"andclass="<id>"; parts aredata-slot="<id>-<part>"with the same class. - Controls:
select/segment→data-<control>="<value>";bool→ the attribute present or absent;range→ the inline custom property--<id>-<control>: <value><unit>;swatch→data-<control>="<token name>"(e.g.data-color="--sb-hue-9"). An absent attribute is the default. - States: the real
:hover,:focus-visible,:disabled,aria-selected="true",aria-checked; for a still picture the same look comes fromdata-hoveranddata-focus. Data states aredata-status="loading|empty|error". - Accent:
--ui-accent(a library variable, set from a token) is the colour of the area or card around;areaandpackage-cardset it from theircolorcontrol.
The owner's decisions it keeps
- Hover changes only the shadow (
--sb-edge→--sb-shadow-lift); no text or card moves. - Edges and glows are even on every side, never only below; no borders on cards, the edge is a shadow.
- The icon is left of the text, its top on the cap line of the first line (title, or the kicker of the Basic card).
- Chips sit under the text, with a grey outline and radius 6 by default; lifted chips have a tight, light shadow.
- No plate under an icon, coloured, grey or white (SBS-R06); covers take the bright area colour, by default as a hairline that fades to the edges.
- The Basic card: a barely-there tint of the area colour with an edge in that colour (
data-fill="faint") and light from under the card (data-glow="under", strength 4, width 1). The Basic frame is a bar on the left.
Card presets
A preset is a bundle; set its layout and size with it (the React library and the explore kit do it for you).
| preset | layout | size | what it changes |
|---|---|---|---|
| base | side | m | nothing: the basis |
| compact | side | s | a larger 52 px icon, two lines of text, chips in one row fading out |
| editorial | side | l | a 19 px title in the display font, roomy |
| cover | top | m | the bare icon, the area colour on the top edge (cover: hairline, hairline-right, tick, edge, icon-only) |
| tiles | badge | m | 118 px squares: icon and name |
Glow
The glow is drawn under the card by ::before/::after with z-index: -1: put cards in a parent with
isolation: isolate (package-grid and area do it).
/design/shtukbase-ui-html.md.Source text