Slant docs

Slant

Documentation for Slant, the TUTTN UI kit: setup, themes, every component, and every piece on the wall.

Install

Terminal
npm i @tuttn/slant

Slant is a workspace package in this repository today; this is the command once it is published.

No build step? Link the hosted stylesheet, wrap your markup in a .slant root, and use the sl-* classes; the tokens are served as JSON too.

Start

Foundations

Primitives

Controls

Forms

FieldA label, a control, a description and an error, wired together with no ids to manage.LabelA control's name, with a required mark, a hint and an action on the same line.Input groupAn input with leading and trailing addons: icons, prefixes, units and buttons.TextareaMulti-line text sized in rows, with optional autosize.Number inputA number field with stepper buttons, arrow keys, limits and a form value.Search fieldA search input with a clear button and a keyboard shortcut.CheckboxA checkbox with an indeterminate state and a card variant.Checkbox groupA named set of checkboxes that holds its checked values as one array.Radio groupA single choice from native radios, as a list or as cards.RatingA score out of five, or any maximum, drawn in slanted pixels.File dropA drop zone and file picker that feeds a file list.Theme selectorA choice of theme, each option painted in its own tokens.SelectA button that opens a list of options, with typeahead and a form value.ComboboxAn input that filters a list of options as you type, sync or async.Tag inputA list of removable tags typed into one field, with suggestions.Date pickerA typed date in the reader’s locale, or one picked from a calendar.Time fieldHours and minutes in segments, on a 12- or 24-hour clock by locale.Secret inputA token or key field that hides its value until asked, with copy.RepeaterRows of fields you add, remove and reorder, between a minimum and a maximum.Key-value editorKeys and values in rows, with unique keys and an optional type for each value.Shortcut recorderA field that records a key combination and refuses reserved or taken ones, saying why.Date and time pickerA date and a time of day in one field, with limits and the time zone shown.

Overlays

Navigation

Layout

Data

Content

Charts

Feedback

People & chat

Media & motion

Editor

Loaders

SwiftUI

Releases

Pieces

Every recipe on the wall has a page of its own: the live piece, usage, keyboard and accessibility notes, and both sources. Open Lab

Components

TabsA tab list with an indicator that slides under the selected tab.PresenceOverlapping avatars for who is here, with a join button and an overflow count.Date rangeA month grid for picking a range, with keyboard movement across days and months.AssistantA chat with an assistant: its reasoning shimmers while it thinks, then folds away as the answer lands. Some answers ask to run a command or ask questions first, and `@` and `/` open menus as you type.Sortable tableA data table with sortable columns and `aria-sort` on the active header.ToastsTransient notices stacking in a corner, each dismissable.MenuA menu with checkable and radio items, separators, and full keyboard control.Progress stepsA multi-step flow with the current step marked and back and next controls.File browserA project's folders in a tree beside the open folder's files, with its path above, a bar for the checked rows, and a menu on every row.Buddy editorA profile card for picking your pixel buddy: colour, expression, accent and accessory, a custom colour, Randomize, and Save or Reset.Loading and empty statesA review queue in its three states: skeleton rows under a shimmering "Thinking…" line while it loads, an empty state with a way out, and the tasks once they arrive.EditorAn agent run in an editor: its stages on a canvas, a toolbar over it, an inspector beside it and a timeline under both, all on one selection.Before / afterA draft and its render of one pixel hillside, one over the other, with a seam to drag, press to, or move with the keys, and a reset.Code reviewOne review round of a four-file change: a list of changed files with their totals, the open file's diff, comments under its lines, and Send round, which asks first.App shellAn app's frame: a sidebar of documents with counts, tabs over the work area, a header with the path and save state, a list beside the picked entry, and the keys along the bottom.

What every piece promises

  • Keyboard first: every control works without a pointer, with one tab stop per composite widget and arrows inside it.
  • Names and states are exposed through roles and ARIA, never only through colour or motion.
  • Focus is always visible: a ring in the theme's accent, on top of any border change.
  • Contrast is gated: text, muted text, state colours and primary buttons meet 4.5:1 in all four themes.
  • Motion respects the system: loaders pause off screen, in hidden tabs and under reduced motion.

License

MIT. Copy it, adapt it, ship it.