Develop
Introduction
What the faifo-design package contains and how its parts fit together.
faifo-design is one npm package with three parts that are meant to be used together:
- Components that return ketjs-view templates: plain HTML with stable
data-uihooks. - One stylesheet that carries the tokens, the fonts and the rules of every component.
- A small runtime that binds the interactions HTML cannot express: menus, dialogs, date pickers, dependent fields, number entry.
The package depends only on @ketvietlab/ketjs-view. It knows nothing about routes,
translators, models, sessions or deployments: an application supplies data and translated
labels, and the components own markup, spacing and behaviour.
#Entry points
| Import | What it gives you |
|---|---|
faifo-design | Every component, type and helper |
faifo-design/styles.css | The whole stylesheet, with fonts embedded |
faifo-design/tokens.css | The tokens alone |
faifo-design/runtime | attachDesignSystemInteractions and the other runtime functions |
faifo-design/runtime/auto.js | A script that attaches the runtime to the document |
faifo-design/contract | HOOKS, OWNERS, the hook ratchet and the layout audit |
faifo-design/catalogue | The specimens, the registry and the inventory the docs are built from |
faifo-design/date-picker, faifo-design/date-picker/runtime | The date pickers alone |
faifo-design/help/runtime | The help drawer behaviour alone, for a host with its own runtime |
faifo-design/atlas/profile.json | The KetAtlas adapter descriptor |
Anything else under faifo-design/… is private. The governance check refuses a deep import that
is not in this table.
#How a screen is built
Start from the highest-level pattern that fits and go down only as far as needed:
- A page pattern (
ListPage,RecordPage,WorkspacePage) decides the order and rhythm of the screen. - Its slots take components: a
DataTable, aRecordForm, aRecordRail. - Primitives (
Button,Field,Badge,Stack) fill what remains.
The Components overview lists them by purpose, and each page has an API reference generated from the source of version 0.1.44.
#Requirements
- Node.js 24.22.3 or later on 24.x, or 26.13.1 or later.
@ketvietlab/ketjs-view1.0.0-rc.1.- Browsers that support
light-dark(), cascade layers,:has()and container queries.