Slant docs
Slant
Documentation for Slant, the TUTTN UI kit: setup, themes, every component, and every piece on the wall.
Install
npm i @tuttn/slantSlant 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
Getting startedAdd Slant to a project, load the stylesheet, and render your first component.ConventionsThe rules every component follows: refs, state props, tone, variant and size, composition, forms and fields, overlays, strings and styles.MCP serverGive a coding agent Slant: a stdio MCP server that answers with components, props, usage, conventions, tokens, themes and recipes.Agent skillsA Claude Code skill that teaches an agent Slant: setup, the themed root, the conventions, and a page per component.
Foundations
ThemingFour themes (Sage, Moon, Ember, Paper), how to switch them, and how to add your own.Theme builderStart from a built-in theme or your own colours, watch real components restyle, check contrast, and export CSS, JSON or SwiftUI.StyleRestyle Slant without fighting it: className on parts, tone, variant and size, the variables meant to be set, and overrides around @layer slant.TokensEvery --sl-* variable, what it drives, and its value in each theme.Layout & textHow Stack, Row, Card, Text and List arrange everything else, with a link to each one's page.Icons85 line icons leaning back 9° like the slanted pixel, or upright, each its own export, with SF Symbol twins in SwiftUI.
Primitives
ButtonPrimary, secondary and ghost buttons with sizes, icons and a loading state.BadgeSmall labels in every tone, with an optional pixel and a monospace variant for numbers.PixelThe slanted pixel, the kit's mark, in every tone and any size.InputText inputs in three sizes, with invalid and monospace variants, that a Field wires up.StackA column of children with a gap between them, in pixels.RowA horizontal, wrapping row with a gap and alignment.CardA surface with the theme's border and radius, a padded body, and an optional header row and footer.TextTitle, body, hint, label and monospace text on the theme's type scale, as any element.ListA plain list of rows, with hairlines between them or without.List itemOne row of a List, its content spread to both ends, in two sizes.KbdA keyboard key, for shortcuts in text and menus.Visually hiddenText for screen readers only: hidden from sight, not from assistive technology.
Controls
SwitchAn accessible toggle with the slanted pixel as its knob.SegmentedA radiogroup of options with roving focus, in two sizes.SliderA range input with a live readout, or a range with two thumbs.Code inputOne-time-code entry with auto-advance, paste and a completion callback.ChipA status chip with a live indicator, which can also be pressed, selected or removed.AlertInline notices with tones, actions, progress and dismissal.ProgressProgress bars with tones, determinate or indeterminate.DisclosureExpandable sections that animate open and closed.Command barA searchable command palette with keyboard navigation.Hold buttonPress and hold to confirm, the wait drawn in slanted pixels.Button groupRelated buttons spaced apart or attached into one bar, sharing a size and variant.Toggle buttonA button that stays pressed until it is pressed again.Toggle groupA row of toggle buttons for one choice or several, with one tab stop and arrow keys.Bar pickerColumns of lights with one picked, as a radiogroup.XY padTwo numbers set with one drag across a field, or with the arrow keys.Copy buttonA button that copies a value, says Copied, and keeps its width.Split buttonA main action and a menu of the others, in one control.
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
PopoverA panel anchored to its trigger that flips to stay in view.TooltipA short description on hover and focus, never the only label.DialogA modal on the native dialog element, with an alert variant.DrawerA modal panel on the start, end or bottom edge, or floating.Context menuA menu at the pointer, or opened by Shift+F10 or the menu key.Image viewerA lightbox that opens from a thumbnail, zooms, and steps through images.Hover cardA rich preview that opens on hover or keyboard focus.
Navigation
TabsTabs with a sliding indicator and arrow-key navigation.MenuA dropdown menu with items, radio groups, checkboxes and separators.ToastA toast queue with a provider, a hook and a stack.StepperProgress steps with done, current and upcoming states.BreadcrumbThe path to the current page or folder, with links or buttons and a collapsible middle.PaginationPage links or buttons with previous and next, ellipses for long ranges, and a compact form.TreeA tree of nested items with roving focus, typeahead, and arrow keys that expand and collapse.Table of contentsLinks to a page's sections that mark the one you are reading as you scroll.SidebarAn app's main navigation: sections of items with icons and counts, open, icons only or hidden, and a drawer on small screens.Document tabsTabs for open documents that close, reorder, overflow into a menu, and add a new one.Key hintsA bar of the keys that work right now, each one pressable, in a primary and a secondary tier.Shortcut sheetEvery keyboard shortcut in a dialog, grouped by where it works, with search.
Layout
AccordionA group of disclosures that opens one section at a time, or several.SeparatorA horizontal or vertical rule, decorative or announced, with an optional label.Scroll areaA scrolling region whose edges fade where more content is hidden.SplitterTwo panes with a handle you can drag or move with the arrow keys.CarouselSlides that snap into place, with previous and next buttons that respect reduced motion.Page headerA page's eyebrow, title, description and actions, with a breadcrumb above and a heading level you choose.
Data
Stat cardA headline number with a label, a delta and an optional sparkline.Goal progressWork completed beside time elapsed, with a breakdown by state.Permission matrixA readable or editable table of permissions, with native checkboxes.Issue cardCompact work items with status, priority, assignees and subtask progress.Filter barRemovable filter conditions, a clear action and space for your filter controls.SparklineA tiny line chart of a series, for a trend beside a number.Bar chartBars for one series, or several grouped or stacked.TimelineA vertical or horizontal timeline of checkpoints with live and fresh states.File listA list of attachments with upload progress, retries and failures.File itemOne attachment: its name, size, upload progress and state, with Retry when it fails and an optional remove button.MeterUsage meters as bars or pixel rows.Plan pickerRadio cards for choosing a plan.TableA sortable data table with custom cell rendering.CalendarA month calendar for picking a date or a range.Day gridDays as slanted-pixel dots sized by value.Range meterA ruler of ticks that rises at the value.StatOne large figure with a label, unit and badge.Relative timeA time read as "12 seconds ago", kept current, and stale after a while.Segment barOne bar split into toned segments, with a legend of values and shares and a total.
Content
ProseStyles for rendered markdown or HTML, and an element map for any renderer that sends code fences to CodeBlock, tables to Table's look, keys to Kbd and rules to Separator.Markdown editorA markdown textarea with a formatting toolbar that inserts at the selection, ⌘B, ⌘I and ⌘K, and a Write/Preview toggle drawn by your own renderer.Diff viewA line diff, unified or split, with word marks, +/− totals, folded unchanged runs, keys from change to change, and a slot for line comments.Field diffTwo versions of a record field by field: before, after and what changed, with the unchanged rows hidden on request.Description listTerms and their values in one or two columns, with nested groups, values to copy, and a message where a value is missing.JSON treeJSON as a tree of typed values, open to a chosen depth, with copy actions on every row and long arrays paged a hundred at a time.
Charts
Line chartLines over categories, one series or several.Area chartFilled lines, overlapping or stacked.Pie chartA donut of shares with a centre readout.HeatmapA contribution grid of slanted-pixel days.FunnelConversion steps with counts, percentage changes and the largest drop.Scatter chartPoints on two numeric axes, one series or several, with axis titles and a walk through the points.Span timelineNested spans as bars on a time axis, for traces and Gantt views: expand, collapse, and drag a range to zoom.
Feedback
SpinnerA small busy indicator of slanted pixels.SkeletonPlaceholder shapes for content still loading.ShimmerText with a light sweeping across it.Empty stateWhat a view shows when it has nothing yet.CountdownA timer counting down to a moment.Error summaryA form’s errors listed at its top, each a link that takes you to its field.Save statusSaved, saving, unsaved, offline, changed elsewhere or failed, without moving the layout.ChecklistChecks that pass, fail or warn, each with its reason, a next step and evidence.
People & chat
AvatarA photo or initials avatar with an optional presence pixel.Avatar stackOverlapping avatars; the count for the rest opens the full list.Pixel buddyA seeded slanted-pixel avatar: one buddy per seed.Avatar editorChoose a pixel buddy’s colour, face and accessories.ThreadA chat log of user and assistant messages.MessageOne chat message from the user or the assistant.Typing dotsThree pixels that pulse while someone is typing.Prompt inputA composer that grows to five lines, with a toolbar, attachments, and send and stop.Code blockSource with light highlighting, a language label and a copy button.ReasoningA model’s thinking: open and shimmering while it thinks, folded away when done.SourcesThe citations behind an answer, folded under a count.Agent planThe steps an agent intends to take, and how far it has got.Agent taskOne step an agent took: its status, what it did, and its output.MarkerAn inline note between turns of a conversation.Agent approvalA tool request that says what and why, answered with Reject, Allow once or Allow always.Agent questionsQuestions an agent asks before it goes on: choices with one recommended, an answer of your own, and submit.
Media & motion
Brand fieldAn embossed slanted pixel with faint construction lines fading into the surrounding surface.TicketA notched pass with a media panel, flexible content and a perforated seam.ReceiptNumbered line items, dotted leaders and a total on a torn-edge receipt.TerminalA compact code or command panel with keyboard scrolling and copy feedback.GradientSlowly moving grainy colour fields in stepped columns, a soft glow, a low horizon or a flowing ribbon.Device framePhone and browser frames around live, accessible content.Pixel fieldSlanted pixels with a light that follows the pointer.Not foundAn error code in slanted pixels, with a way out.PlanetA globe of slanted-pixel dots with focusable markers.SoundwaveSix ways to draw the audio levels you supply.Rolling numberDigits that roll to their new value.Tilt cardA card that leans towards the pointer.CompareA before and after with a seam you drag, or move with the keys.
Editor
WorkbenchThe frame of an editor: a canvas with a toolbar over it, an inspector beside it and tracks under it.FlowA canvas of nodes joined by animated links, with pan, zoom, drag and a keyboard for all three.ToolbarTools, actions and separators in one tab stop, with one tool chosen at a time.InspectorThe settings panel beside a canvas: a rail of icons, each opening a page of titled sections.TracksTracks of clips under a ruler, with a playhead you can scrub or step with the keys.Lane boardLanes of cards you drag within a lane and between lanes, or move with the keyboard.Command dockA small button that opens into a field, with the answer streaming in underneath, row by row.
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
Controls
Buttons & badgesPrimary, secondary, and ghost buttons beside status badges, all drawn from the same tokens.Agent statusA list of coding agents with a chip for each state: thinking, waiting, done, or blocked.Command barA command palette: type to filter, arrow through the matches, press Enter to run one.SwitchesSettings rows with a switch each, labelled by the row title.Verification codeSix single-digit inputs that behave as one field: typing advances, Backspace steps back, paste fills them all.Segmented & sliderA segmented control over a slider, the two inputs that settle most small choices.AlertsInline notices for information, success, and errors, each with an action and a dismiss button.DisclosureQuestions that open to their answers, one at a time or several.Sign-up formA sign-up form built from Fields: name, email, a password you can reveal, a plan and the terms, each checked when you submit.Filter barSearch, a status toggle and label chips narrowing a task list as you go, with the active filters as chips you can remove.ScheduleA “Schedule a review” form: a DatePicker from today on, a segmented TimeField and two Selects, checked when you submit and read back as one sentence.Entry editorAn “Edit post” form: a title, a slug, the body, a Repeater of links and a scheduled publish, autosaved as you type, with an ErrorSummary when Publish finds a problem.
Data
Stat cardsHeadline numbers with a trend and a sparkline, switchable between periods.Sessions by hourA bar chart you can walk with the keyboard, announcing each hour as you go.Checkpoint timelineSaved checkpoints on a vertical timeline, with restore actions.AttachmentsFiles with type and size, uploading in place, with a retry for the one that failed.MetersUsage meters for quotas, with buttons that move the values.Plan pickerThree plans as a radio group, the chosen one highlighted, with a continue button.ActivitySixteen weeks of agent sessions as a grid of slanted pixels, with totals that roll as you switch between week, month, and quarter.Usage dashboardUsage at a glance: headline numbers, requests per day from two sources, twelve weeks of daily sessions, and tokens by model.Run detailOne training run in detail: its status and last report, time by phase, the spend forecast against the budget, loss by step, and the trace, with a failed eval.
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.
Workspace
Workspace navAftur's project rail beside its tools: pick a project, then tasks, plans, activity, or memory.Task listAftur's task list: scope tabs with counts, search, grouping by status, and a status menu on every row.Ticket panelAftur's ticket: an editable title, a status menu with its save state, criteria, and a history that grows.Review checksCompletion criteria with your verdict on each, a progress meter, and an outcome that waits for every check.AppearanceAftur's appearance settings: preview a theme in its own tokens, choose a density, then use it.DialogModal sheets on the native dialog element: confirm a discard, or collect a name, with focus handled for you.FeedbackA feedback sheet on Slant’s Dialog: a recessed Textarea well that grows as you write, a character count, a screenshot option, and Send.
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.