Truss UI

A Svelte 5 / SvelteKit design system that blends Material 3's tonal surfaces, elevation and rounding with Blueprint's density, 32px controls and hairline structure — built from scratch, with no UI-library dependencies.
Docs and live demo: https://truss.ruck.io
- 140+ components: forms and pickers (no native
<select>, date or time inputs), data tables with virtual scrolling, trees, menus, dialogs, an application shell and more.
- Zero runtime dependencies in the core (peer:
svelte). Fonts are bundled and served by your build.
- Accessible by construction: names, ARIA, focus and complete keyboard maps, audited for every combination of every component's options.
- Themeable: one set of
--tr-* CSS tokens, light and dark, drives everything, including charts, graphs and maps.
- Tested like a library: over 16,000 real-browser tests sweep option matrices and verify behaviour.
Packages
| Package |
What |
Dependencies |
@ruckc/truss-ui |
Core: tokens, fonts, icons, components |
peer: svelte |
@ruckc/truss-chart |
Line, bar, donut, histogram, sparkline (SVG) |
peer: svelte |
@ruckc/truss-graph |
Node/edge editor, custom nodes, 5 edge routers, minimap |
peers: svelte, @ruckc/truss-ui |
@ruckc/truss-ol |
OpenLayers map styled by the tokens |
peers: svelte, @ruckc/truss-ui, ol |
Quick start
npm install @ruckc/truss-ui
<!-- +layout.svelte -->
<script lang="ts">
import '@ruckc/truss-ui/styles.css';
import { Toaster } from '@ruckc/truss-ui';
let { children } = $props();
</script>
{@render children()}
<Toaster />
<script lang="ts">
import { Button, Input, DatePicker, toasts } from '@ruckc/truss-ui';
let name = $state('');
let due = $state<string>();
</script>
<Input label="Name" bind:value={name} />
<DatePicker label="Due" bind:value={due} />
<Button onclick={() => toasts.success(`Saved ${name}`)}>Save</Button>
With SvelteKit remote functions, controls take a form() field's .as() spread and its issues() (hidden inputs make Select, MultiSelect, Combobox, NumberInput, PhoneInput, CurrencyInput, CardInput, TreeSelect, TransferList and the pickers post natively):
<form {...createTask}>
<Input label="Title" {...f.title.as('text')} issues={f.title.issues()} />
<Select label="Priority" options={priorities} {...f.priority.as('select')} issues={f.priority.issues()} />
</form>
See Getting started, the component reference (a live playground and generated API table for every component), Theming and Accessibility.
Highlights
- DataTable: sticky header, resizable and sortable columns, tree rows, checkbox selection, column menu, optional pagination or virtual scrolling with infinite loading, per-column filters (a filter row, a heading menu opened by right-click or Shift+F10, or both) and a remote mode for server-side filtering and sorting.
- Date and time:
Calendar, DatePicker, DateRangePicker, TimePicker, DateTimePicker, DateTimeRangePicker (one combined popover), TimeRangePicker, DurationInput.
- InputGroup: joins inputs, selects, pickers, buttons and addons into one seamless control.
- Graph: custom node components, named ports on any side, edge routing (
bezier, straight, step, smoothstep, avoid) and a minimap.
- Charts: horizontal, stacked, 100% stacked and negative bars; histograms with drag-to-brush; every chart has a table view and keyboard readout.
Development
npm install
npm run dev # demo + docs site at http://localhost:5173
npm run check # svelte-check
npm run package:all # build all four packages into their dist/ folders
npm run build # regenerate the API docs and prerender the site (adapter-static)
npm test # the full browser suite (starts its own dev server)
npm run test:coverage # the suite with V8 coverage; the report lands in coverage/report/index.html
Coverage is collected from the browser (V8, no instrumented build) and mapped back to the .svelte/.ts sources; coverage/report/ also holds lcov.info and coverage-summary.json. To measure a subset, run COVERAGE=1 npx playwright test tests/misc.spec.ts and then npm run coverage:report. In CI the browser suite is split into 6 parallel shards; a final job merges their test reports and coverage into one HTML report and a summary on the run page (report only, no thresholds).
Repository layout:
src/lib/ @ruckc/truss-ui (core)
packages/charts/ @ruckc/truss-chart
packages/graph/ @ruckc/truss-graph
packages/map/ @ruckc/truss-ol
src/routes/ the docs and demo site
src/harness/, tests/ the component matrix and behavioural specs
scripts/ API-reference and token extraction for the docs
The API reference is generated from the source (npm run docs), so it can't drift from the code. The test suite is described in Testing.
Releases
Every push to main that passes CI is released automatically: the version is worked out from the commit messages (Conventional Commits), all four packages are published to npm at that same version, and a GitHub release and CHANGELOG.md entry are created.
| Commit |
Release |
feat: … |
minor |
fix:, perf:, revert:, docs:, refactor:, test:, build:, ci:, chore:, style: |
patch |
any type with ! (e.g. feat!: …) or a BREAKING CHANGE: footer |
major |
Commits that don't follow the format (no type: prefix) don't trigger a release on their own. Publishing uses npm trusted publishing (OIDC from the ci.yml workflow), so no npm token is stored anywhere. Each package's trusted publisher on npmjs.com must be for workflow ci.yml with the npm publish action allowed (the default is only npm stage publish, which npm rejects with 403 OIDC permission denied for this action).
A new version can take several minutes to become installable after the release job publishes it, so an install that returns 404 right after a release should be retried rather than republished.
Licence
MIT © Curtis Ruck. The bundled Inter and JetBrains Mono fonts are under the SIL Open Font License 1.1.