@slashsuite/ui-react 0.11.3 → 0.12.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (96) hide show
  1. package/README.md +14 -1
  2. package/agent-docs/components/app-shell.md +136 -0
  3. package/agent-docs/components/avatar-stack.md +64 -0
  4. package/agent-docs/components/avatar.md +76 -0
  5. package/agent-docs/components/badge.md +61 -0
  6. package/agent-docs/components/body-text.md +158 -0
  7. package/agent-docs/components/bottom-sheet.md +95 -0
  8. package/agent-docs/components/breadcrumbs.md +62 -0
  9. package/agent-docs/components/bullet-list.md +54 -0
  10. package/agent-docs/components/button.md +135 -0
  11. package/agent-docs/components/callout.md +86 -0
  12. package/agent-docs/components/card-grid.md +108 -0
  13. package/agent-docs/components/card.md +113 -0
  14. package/agent-docs/components/centered-layout.md +90 -0
  15. package/agent-docs/components/chat-composer.md +48 -0
  16. package/agent-docs/components/chat-message.md +61 -0
  17. package/agent-docs/components/chat-thread.md +49 -0
  18. package/agent-docs/components/checkbox.md +75 -0
  19. package/agent-docs/components/cluster.md +106 -0
  20. package/agent-docs/components/code-example.md +48 -0
  21. package/agent-docs/components/code.md +70 -0
  22. package/agent-docs/components/colour-scheme-toggle.md +92 -0
  23. package/agent-docs/components/container.md +50 -0
  24. package/agent-docs/components/copy-button.md +61 -0
  25. package/agent-docs/components/copy-line.md +54 -0
  26. package/agent-docs/components/date-field.md +103 -0
  27. package/agent-docs/components/date-range-picker.md +101 -0
  28. package/agent-docs/components/detail-layout.md +147 -0
  29. package/agent-docs/components/dialog.md +178 -0
  30. package/agent-docs/components/disclosure.md +66 -0
  31. package/agent-docs/components/divider.md +62 -0
  32. package/agent-docs/components/docs-layout.md +160 -0
  33. package/agent-docs/components/drawer.md +128 -0
  34. package/agent-docs/components/empty-state.md +67 -0
  35. package/agent-docs/components/field-dialog.md +97 -0
  36. package/agent-docs/components/field.md +68 -0
  37. package/agent-docs/components/fieldset.md +82 -0
  38. package/agent-docs/components/file-drop.md +52 -0
  39. package/agent-docs/components/form-layout.md +141 -0
  40. package/agent-docs/components/form-row.md +93 -0
  41. package/agent-docs/components/full-bleed-layout.md +116 -0
  42. package/agent-docs/components/headings.md +101 -0
  43. package/agent-docs/components/hero.md +59 -0
  44. package/agent-docs/components/icon-button.md +92 -0
  45. package/agent-docs/components/icon.md +66 -0
  46. package/agent-docs/components/image.md +64 -0
  47. package/agent-docs/components/input.md +83 -0
  48. package/agent-docs/components/kbd.md +38 -0
  49. package/agent-docs/components/key-value-list.md +81 -0
  50. package/agent-docs/components/lightbox.md +97 -0
  51. package/agent-docs/components/list-layout.md +154 -0
  52. package/agent-docs/components/list-row.md +116 -0
  53. package/agent-docs/components/loading.md +69 -0
  54. package/agent-docs/components/markdown.md +51 -0
  55. package/agent-docs/components/media-tile.md +97 -0
  56. package/agent-docs/components/menu.md +103 -0
  57. package/agent-docs/components/meta-list.md +69 -0
  58. package/agent-docs/components/morph.md +128 -0
  59. package/agent-docs/components/navigation-progress.md +56 -0
  60. package/agent-docs/components/outline-region.md +63 -0
  61. package/agent-docs/components/page-fade.md +116 -0
  62. package/agent-docs/components/page-header.md +93 -0
  63. package/agent-docs/components/pagination.md +64 -0
  64. package/agent-docs/components/pill.md +104 -0
  65. package/agent-docs/components/progress-bar.md +66 -0
  66. package/agent-docs/components/prose-layout.md +87 -0
  67. package/agent-docs/components/prose.md +41 -0
  68. package/agent-docs/components/radio-group.md +74 -0
  69. package/agent-docs/components/scroll-strip.md +48 -0
  70. package/agent-docs/components/segmented-control.md +133 -0
  71. package/agent-docs/components/select.md +65 -0
  72. package/agent-docs/components/show.md +120 -0
  73. package/agent-docs/components/side-column.md +70 -0
  74. package/agent-docs/components/sidebar-layout.md +134 -0
  75. package/agent-docs/components/site-footer.md +63 -0
  76. package/agent-docs/components/site-search.md +67 -0
  77. package/agent-docs/components/sortable-list.md +107 -0
  78. package/agent-docs/components/split-bar.md +54 -0
  79. package/agent-docs/components/stack.md +197 -0
  80. package/agent-docs/components/stacked-bar.md +88 -0
  81. package/agent-docs/components/stat-tile.md +69 -0
  82. package/agent-docs/components/status-pages.md +105 -0
  83. package/agent-docs/components/steps.md +74 -0
  84. package/agent-docs/components/sticky-bar.md +51 -0
  85. package/agent-docs/components/switch.md +79 -0
  86. package/agent-docs/components/table.md +373 -0
  87. package/agent-docs/components/tabs.md +180 -0
  88. package/agent-docs/components/text-link.md +105 -0
  89. package/agent-docs/components/textarea.md +51 -0
  90. package/agent-docs/components/timeline.md +79 -0
  91. package/agent-docs/components/toast.md +86 -0
  92. package/agent-docs/components/trend-chart.md +61 -0
  93. package/agent-docs/components/video.md +44 -0
  94. package/agent-docs/llms.txt +155 -0
  95. package/package.json +6 -3
  96. package/skills/uislash/SKILL.md +20 -0
@@ -0,0 +1,105 @@
1
+ ## TextLink
2
+
3
+ Group: Text
4
+
5
+ When to use: A link that sits in text. A link that must look like a button is a `Button` with `href`.
6
+
7
+ ### Use instead
8
+ - Button (button.md): The link must look like a button: a `Button` with `href`.
9
+
10
+ ### The one right way
11
+ A link in running text is a `TextLink` inside a `Text`.
12
+ ```tsx
13
+ import { Text, TextLink } from "@slashsuite/ui-react";
14
+
15
+ <Text>
16
+ Questions? Email <TextLink href="mailto:hello@example.com">hello@example.com</TextLink>, or
17
+ read the <TextLink href="#terms">terms</TextLink> first.
18
+ </Text>
19
+ ```
20
+
21
+ ### Do
22
+ - Use `TextLink` for every link in running text.
23
+ - `external` is for another site: it opens a new tab with `rel="noreferrer"`.
24
+ - In an app with a router, set the router's `<Link>` once on a `LinkProvider` and give each `TextLink` its `href`. The library has no router.
25
+ - Set the adapter once, at the router. TanStack Router: `InnerWrap: ({ children }) => <LinkProvider link={(p) => <Link to="." {...p} />}>{children}</LinkProvider>` on `createRouter` (`to="."` satisfies the typed `to`; the `href` wins). React Router: `<LinkProvider link={({ href, ...p }) => <Link to={href} {...p} />}>`. Astro: no provider.
26
+ - `home` on the same `LinkProvider` is where every status page's "Back to home" goes, `/` by default (`home="https://example.com"` with no `link` for a home on another site). A provider inside another keeps what it does not set.
27
+ - Only an in-app path (`/quotes?page=2#top`) reaches the adapter; `external`, `https:`, `mailto:`, `#hash` and a relative path are a plain `<a>`.
28
+ - `size` pins the type size to `sm`, `md` or `lg`; left out, the link takes the size of its text. `mono` sets the monospace face for a path or an id.
29
+ - `tone` gives the link a meaning's colour (`warn`, `danger`, `positive`, `info`, `muted`), underlined on hover. Use it for a link that is the message, like "3 failed". `underline` underlines it always: set it where the text around the link is as heavy as the link (a `Text strong`, a heading), since colour alone does not mark a link (WCAG 1.4.1); in plain `Text` its weight marks it.
30
+
31
+ ### Don't
32
+ - Never write a bare `<a>` for a link in running text.
33
+ - Never a render prop or a wrapper component per link. Every part that links (`Button`, `Card`, `ListRow`, `Tabs`, `Breadcrumbs` and the rest) takes `href` and goes through the same `LinkProvider`.
34
+
35
+ A bare `<a>` has none of the theme's link colour, weight or focus ring.
36
+ ```tsx
37
+ import { Text } from "@slashsuite/ui-react";
38
+
39
+ <Text>
40
+ Questions? Email <a href="mailto:hello@example.com">hello@example.com</a>, or read the{" "}
41
+ <a href="#terms">terms</a> first.
42
+ </Text>
43
+ ```
44
+
45
+ `target="_blank"` by hand leaves out the `rel`. Say `external` and the link gets both.
46
+ ```tsx
47
+ import { TextLink } from "@slashsuite/ui-react";
48
+
49
+ <TextLink href="https://example.com" target="_blank">
50
+ example.com
51
+ </TextLink>
52
+ ```
53
+
54
+ A router `<Link>` drawn by hand at each link loses the TextLink look and its focus ring: give `TextLink` the `href`, and the app's `LinkProvider` draws the router link.
55
+ ```tsx
56
+ <a href="#terms">Read the terms</a>
57
+
58
+ ```
59
+
60
+ Two stretched links in one card both claim the whole card, so a click lands on whichever is last. Stretch the one link; the other sits above it.
61
+ ```tsx
62
+ import { Card, TextLink } from "@slashsuite/ui-react";
63
+
64
+ <Card title="Quote 12">
65
+ <TextLink href="#quote-12" stretch>
66
+ Open the quote
67
+ </TextLink>
68
+ <TextLink href="#client-4" stretch>
69
+ Open the client
70
+ </TextLink>
71
+ </Card>
72
+ ```
73
+
74
+ ### Accessibility
75
+ - A `TextLink` is a native `<a>`, so it is in the tab order and opens with Enter.
76
+ - It has a focus ring from the component, so the keyboard focus is always visible.
77
+ - `external` sets `target="_blank"` and `rel="noreferrer"`.
78
+ - Every anchor prop (`aria-*`, `download`, `title`, a handler) goes on the `<a>`; the app's `LinkProvider` adapter receives them as well.
79
+
80
+ ### Props
81
+ ### TextLink
82
+ An inline text link in the accent colour. Every anchor prop goes on the `<a>`; an in-app `href` is drawn by the app's router link through `LinkProvider`. `size` pins the type size (`sm`, `md` or `lg`), `tone` gives it a meaning's colour and `mono` sets the monospace face.
83
+ - external: boolean (default false). Opens in a new tab: adds `target="_blank"` and `rel="noreferrer"`.
84
+ - href: string (required). Where the link goes; an in-app path goes through the app's `LinkProvider`.
85
+ - mono: boolean (default false). The monospace face, for a path, an id or a command.
86
+ - size: "sm" | "md" | "lg". The link's own type size: `sm` is `text-xs`, `md` `text-sm` and `lg` `text-base`. Left out, it
87
+ takes the size of the text around it: a link inside prose has no default size.
88
+ - stretch: boolean (default false). The link covers its nearest `relative` ancestor, so the whole row or card is the click target.
89
+
90
+ Put it on the one link of a `Card` or a `TableRow` (a table row's first cell): any other link
91
+ or button in it sits above the link and is clickable on its own. An action that is not
92
+ navigation stays a `Button` in an actions column.
93
+ - tone: "neutral" | "info" | "positive" | "warn" | "danger" | "muted" | "accent". A meaning's colour, as on the inline roles: `warn` for a warning link, `danger`, `positive`,
94
+ `info` or `muted`. Left out, the link is the accent colour.
95
+ - underline: boolean (default false). Always underlined, for a link set inside running text, where colour alone does not mark it (WCAG 1.4.1).
96
+
97
+ ### LinkProvider
98
+ Names the app's router link once, so every part that links (`Button`, `IconButton`, `TextLink`, `Pill`, `Card`, `ListRow`, `Breadcrumbs`, `Tabs`, `SegmentedControl`, `AppShellBrand`, `SiteSearch`, `MediaTile`, `Avatar` and the status pages) takes a plain `href` and draws an in-app one (a path from the root, `/quotes?page=2#top`) through the router. It renders no element. - TanStack Router: `createRouter({ routeTree, InnerWrap: ({ children }) => <LinkProvider link={(p) => <Link to="." {...p} />}>{children}</LinkProvider> })`, which also reaches the router's not-found and error components. A registered router's `Link` requires `to`; `to="."` satisfies it, and the `href` wins. - React Router: `<LinkProvider link={({ href, ...p }) => <Link to={href} {...p} />}>` inside the router. - Astro, or no router: no provider; every link is a plain `<a>`. An `external` link, a full URL (`https:`, `mailto:`, `tel:`), a `//` URL, a `#hash` or a relative path never reaches the adapter: the library draws those as a plain `<a>`. `home` is where every status page's "Back to home" goes, `/` by default: the one place an app says it, never a page. A full URL (a home on another site) is a plain `<a>` in the same tab. A provider inside another keeps what it does not set, so `<LinkProvider home="/app">` within the router's provider still draws through the router's link.
99
+ - home: string (default "/"). Where the status pages' "Back to home" goes: an in-app path or a full URL.
100
+ - link: LinkAdapter. The app's router link, handed `LinkAdapterProps`. Left out, links are plain `<a>` (or the outer provider's).
101
+
102
+ ### Types
103
+ - LinkAdapter: `(props: LinkAdapterProps) => ReactNode`. Draws one in-app link: the app's router `<Link>`, handed `LinkAdapterProps`.
104
+ - LinkAdapterProps: `{ href: string; className: string; children: ReactNode; aria-current?: boolean | "page" | "time" | "false" | "true" | "step" | "location" | "date"; target?: string; rel?: string; title?: string }`. What the app's `LinkAdapter` receives to draw an in-app link with its router's `<Link>`: the destination as `href` (search and hash included), the component's classes, its label as `children`, and (for a tab that is current, or an option with a tooltip) `aria-current`, `target`, `rel` and `title`. `@slashsuite/ui-react` has no router dependency. An optional field is `?: T`, never `?: T | undefined`, and a key that has no value is left out rather than set to `undefined`. A router's `<Link>` declares its props that way, so under `exactOptionalPropertyTypes` the spread compiles. Any other anchor prop the caller gave the component (`id`, `data-*`, `download`, a handler) arrives too, untyped here, and `<Link>` takes it as its own.
105
+ - TextLinkSize: `"sm" | "md" | "lg"`. A TextLink's pinned type size, on the `Size` scale; left out, it takes the size of the text around it.
@@ -0,0 +1,51 @@
1
+ ## Textarea
2
+
3
+ Group: Forms
4
+
5
+ When to use: Text that runs to a sentence or a paragraph: a review, a note, a message.
6
+
7
+ ### The one right way
8
+ Text that runs to a paragraph is a `Textarea` in a `Field`, so the person can see what they wrote.
9
+ ```tsx
10
+ import { Field, Textarea } from "@slashsuite/ui-react";
11
+
12
+ <Field label="Review" htmlFor="do-review" hint="What did you find? How were the prices?">
13
+ <Textarea id="do-review" rows={4} />
14
+ </Field>
15
+ ```
16
+
17
+ ### Do
18
+ - Put a `Textarea` in a `Field`, as with an `Input`.
19
+ - `rows` is 3 unless you set it; set more for a long answer.
20
+ - `size` and `width` are the same choices as on `Input`. In a `Field` it fills the row; on its own it is as wide as its longest choice.
21
+ - One line of text is an `Input`.
22
+ - `mono` sets the monospace face, for pasted CSV or statement text where the columns must line up.
23
+
24
+ ### Don't
25
+ An `Input` is one line: a paragraph typed into it scrolls out of sight.
26
+ ```tsx
27
+ import { Field, Input } from "@slashsuite/ui-react";
28
+
29
+ <Field label="Review" htmlFor="dont-review" hint="What did you find? How were the prices?">
30
+ <Input id="dont-review" />
31
+ </Field>
32
+ ```
33
+
34
+ ### Accessibility
35
+ - A `Textarea` is a native `<textarea>`: it takes `name`, `required`, `disabled`, `maxLength` and the `aria-*` props.
36
+ - In a `Field`, the `Field` around it gives it its label and its hint or error as `aria-describedby`, and an error marks it `aria-invalid` with a red edge.
37
+ - The focus ring comes from the component.
38
+
39
+ ### Props
40
+ ### Textarea
41
+ A multi-line text input, styled like `Input`. `rows` defaults to 3. Takes `size`, `width` and `mono` too. The `ref` reaches the `<textarea>`, for focus control.
42
+ - disabled: boolean (native). Disables the field; say why in its `Field` hint.
43
+ - mono: boolean (default false). The monospace face, for pasted CSV or statement text, where the columns must line up. Off by default.
44
+ - name: string (native). The key the value posts under in a form.
45
+ - placeholder: string (native). A hint shown while the field is empty; never the label.
46
+ - ref: Ref<HTMLTextAreaElement>. The `<textarea>` itself, for focus control.
47
+ - rows: number (native). How many lines tall it starts.
48
+ - size: "sm" | "md" | "lg" (default md). `sm` is compact, `text-sm` with less padding, for dense forms and table rows; `md` is `text-base`;
49
+ `lg` is `text-lg` with more padding, for a hero form. Under an `AppShell density="compact"` each
50
+ is one type step down, and on a touch screen a field is never under 16px.
51
+ - width: "sm" | "md" | "lg" | "xs" | "auto" | "fill" | "full" (default full). `full` (default) fills the parent; `fill` grows to fill the room left in a row beside other items (it can shrink to nothing, so buttons stay on the line); `xs`, `sm`, `md`, `lg` are fixed; `auto` adds no width class, so the control is as wide as the browser makes it.
@@ -0,0 +1,79 @@
1
+ ## Timeline
2
+
3
+ Group: Content
4
+
5
+ When to use: A history of what happened and when: status changes, a record's activity.
6
+
7
+ ### Use instead
8
+ - BulletList (bullet-list.md): The items have no order and no time.
9
+ - Steps (steps.md): The items are a sequence the reader still has to follow.
10
+
11
+ ### The one right way
12
+ A `title` (a Pill or a short label), the `time` already formatted for the reader, and a note under them.
13
+ ```tsx
14
+ import { Pill, Timeline, TimelineItem } from "@slashsuite/ui-react";
15
+
16
+ <Timeline label="Status history">
17
+ <TimelineItem
18
+ tone="positive"
19
+ title={<Pill tone="positive">accepted</Pill>}
20
+ time="12 Oct 2026, 09:14"
21
+ >
22
+ Client confirmed by phone.
23
+ </TimelineItem>
24
+ <TimelineItem title={<Pill tone="warn">sent</Pill>} time="10 Oct 2026, 16:02" />
25
+ </Timeline>
26
+ ```
27
+
28
+ ### Do
29
+ - Name the list with `label`, and order the `TimelineItem`s yourself, newest or oldest first.
30
+ - A `TimelineItem` has a `title` (a `Pill` or a short label), a `time` you have already formatted for the reader, and an optional note as its children.
31
+ - `tone` colours the marker dot with the Callout's set (`neutral`, `info`, `positive`, `warn`, `danger`); `neutral` is a plain ring.
32
+ - Give the Timeline an `empty`, an `EmptyState`, to draw when there are no items (one muted line here); without one it draws nothing.
33
+ - Numbered instructions are `Steps`, not a Timeline.
34
+
35
+ ### Don't
36
+ `time` is drawn as given: a raw ISO string reads as machine output. Format it before it gets here.
37
+ ```tsx
38
+ import { Timeline, TimelineItem } from "@slashsuite/ui-react";
39
+
40
+ <Timeline label="Status history">
41
+ <TimelineItem title="accepted" time="2026-10-12T09:14:00.000Z">
42
+ Client confirmed by phone.
43
+ </TimelineItem>
44
+ <TimelineItem title="sent" time="2026-10-10T16:02:00.000Z" />
45
+ </Timeline>
46
+ ```
47
+
48
+ A Timeline with no items and no `empty` draws nothing, so the reader cannot tell an empty history from a missing one. Give it an `empty`.
49
+ ```tsx
50
+ import { Timeline } from "@slashsuite/ui-react";
51
+
52
+ <Timeline label="Status history" />
53
+
54
+ ```
55
+
56
+ ### Accessibility
57
+ - `Timeline` is an `<ol>` named by `label` (`aria-label`), and each `TimelineItem` is an `<li>`.
58
+ - The marker dot is `aria-hidden`, so `tone` is colour only: say the outcome in the `title`.
59
+ - `time` is plain text, as you formatted it.
60
+
61
+ ### Props
62
+ ### Timeline
63
+ A vertical list of events, newest or oldest first as the caller orders them. A named `<ol>` of `TimelineItem`s on a rail; with no children it draws `empty` (an `EmptyState`, one muted line here) instead of an empty list. While `loading` with no items it draws three items of bones, never `empty`.
64
+ - empty: ReactNode. Drawn in place of the list when there are no items: an `EmptyState`.
65
+ - id: string. The root element's `id`: an anchor, or the target of a `for` or an `aria-describedby`.
66
+ - label: string (required). Names the list (`aria-label`), e.g. "Status history".
67
+ - loading: boolean. The data is not here yet: an empty slot draws a bone of its shape, a filled one draws as usual.
68
+ Left out, the part takes the nearest loading layout's or part's; `false` opts it out inside one.
69
+ - loadingLabel: string (default Loading). What a screen reader hears while this part is loading, when its own `loading` is set.
70
+
71
+ ### TimelineItem
72
+ One event: a `title` (a `Pill`, a heading), a `time` the app has already formatted, and the `children` as a note under them. `tone` colours the marker dot with the Callout's set. While `loading` an empty `title` is a bone.
73
+ - id: string. The root element's `id`: an anchor, or the target of a `for` or an `aria-describedby`.
74
+ - loading: boolean. The data is not here yet: an empty slot draws a bone of its shape, a filled one draws as usual.
75
+ Left out, the part takes the nearest loading layout's or part's; `false` opts it out inside one.
76
+ - loadingLabel: string (default Loading). What a screen reader hears while this part is loading, when its own `loading` is set.
77
+ - time: ReactNode. When, already formatted by the app, small and muted beside the title.
78
+ - title: ReactNode (required). What happened: text, a `Pill` or a heading.
79
+ - tone: "neutral" | "info" | "positive" | "warn" | "danger" (default neutral). The marker dot's colour. Defaults to `neutral`, a plain ring. Say it in the text too: colour alone says nothing to a screen reader.
@@ -0,0 +1,86 @@
1
+ ## Toast
2
+
3
+ Group: Feedback
4
+
5
+ When to use: A confirmation or an offer that should not move the page: Saved, Copied, Update available.
6
+
7
+ ### The one right way
8
+ A confirmation is a toast the app adds to the list it holds: it leaves on its own after five seconds.
9
+ ```tsx
10
+ import { useState } from "react";
11
+ import { Button, Toast, ToastRegion } from "@slashsuite/ui-react";
12
+
13
+ function Example() {
14
+ const [toasts, setToasts] = useState<Toast[]>([]);
15
+ return (
16
+ <>
17
+ <Button
18
+ onClick={() =>
19
+ setToasts((all) => [
20
+ ...all,
21
+ { id: crypto.randomUUID(), tone: "positive", title: "Saved" },
22
+ ])
23
+ }
24
+ >
25
+ Save
26
+ </Button>
27
+ <ToastRegion
28
+ toasts={toasts}
29
+ onDismiss={(id) => setToasts((all) => all.filter((toast) => toast.id !== id))}
30
+ />
31
+ </>
32
+ );
33
+ }
34
+ ```
35
+
36
+ ### Do
37
+ - Mount one `ToastRegion` at the root of the app, beside `AppShell`, and hold the list in state: add a `Toast` to show it, and drop it by `id` in `onDismiss`.
38
+ - Each toast is a `title`, an optional `body` line and a `tone` (`neutral`, the default, `info`, `positive`, `warn` or `danger`), on the same surfaces as a `Callout`.
39
+ - A `neutral`, `info` or `positive` toast with no `actions` leaves on its own after five seconds, paused while the pointer is over it or focus is in it. One action goes in `actions` as a `Button size="sm"`; a toast with `actions`, or a `warn` or `danger` one, stays until it is dismissed.
40
+ - A toast raised while a `Dialog` or `Drawer` is open sits under it, and can be read and dismissed once it closes.
41
+ - Anything the reader must keep, such as a token shown once, is a `Callout` in the page. A failure that must be answered is a `Dialog`, and a field's error is its `Field`'s.
42
+
43
+ ### Don't
44
+ A save notice pushed into the page flow moves the form under the reader and never leaves.
45
+ ```tsx
46
+ import { Callout, Stack, Text } from "@slashsuite/ui-react";
47
+
48
+ <Stack gap="sm">
49
+ <Callout tone="positive">Details saved</Callout>
50
+ <Text>The form the reader was filling in, now a line lower.</Text>
51
+ </Stack>
52
+ ```
53
+
54
+ An action put in `body` is not an action to the region: the toast still leaves after five seconds, taking the button with it before the reader reaches it.
55
+ ```tsx
56
+ import { Button, ToastRegion } from "@slashsuite/ui-react";
57
+
58
+ <ToastRegion
59
+ onDismiss={() => undefined}
60
+ toasts={[
61
+ {
62
+ id: "update",
63
+ tone: "info",
64
+ title: "Update available",
65
+ body: <Button size="sm">Reload</Button>,
66
+ },
67
+ ]}
68
+ />
69
+ ```
70
+
71
+ ### Accessibility
72
+ - The region is a landmark named by `label` ("Notifications") with a polite `role="status"` inside, in the page before the first toast, so each new toast is read once and the focus does not move.
73
+ - Each toast's close button is named by `dismissLabel` ("Dismiss").
74
+ - The hide pauses on hover and on focus, and under `prefers-reduced-motion` it still leaves at the same moment, with no fade.
75
+
76
+ ### Props
77
+ ### ToastRegion
78
+ The page's toasts: short notices fixed to the bottom of the viewport, from a list the app holds. Mount it once, at the root beside `AppShell`; add a toast to `toasts` to show it, and drop it in `onDismiss` to remove it. A `neutral`, `info` or `positive` toast with no `actions` leaves on its own after five seconds (paused while the pointer is over it or focus is in it); a `warn` or `danger` toast, or one with `actions`, stays until dismissed. The region is a named landmark with a polite `role="status"`, kept in the page while empty, so each new toast is read once. A toast raised while a `Dialog` or `Drawer` is open sits under it until it closes.
79
+ - dismissLabel: string (default Dismiss). The close button's name.
80
+ - id: string. The root element's `id`: an anchor, or the target of a `for` or an `aria-describedby`.
81
+ - label: string (default Notifications). The region's accessible name.
82
+ - onDismiss: (id: string) => void (required). Called by a toast's close button and when a self-hiding toast's time is up: drop it from `toasts`.
83
+ - toasts: readonly Toast[] (required). What is shown, oldest first. `[]` shows nothing and keeps the live region in the page.
84
+
85
+ ### Types
86
+ - Toast: `{ id: string; title: string; body?: ReactNode; tone?: Tone; actions?: ReactNode }`. One notice in a `ToastRegion`. The caller holds the list; the region draws it.
@@ -0,0 +1,61 @@
1
+ ## TrendChart
2
+
3
+ Group: Data
4
+
5
+ When to use: A figure over ordered time buckets: weekly counts, a trend.
6
+
7
+ ### The one right way
8
+ Bars for a count in each week: each bucket stands on its own.
9
+ ```tsx
10
+ import { TrendChart } from "@slashsuite/ui-react";
11
+
12
+ <TrendChart
13
+ label="Tickets closed per week"
14
+ buckets={["W1", "W2", "W3", "W4", "W5", "W6", "W7", "W8"]}
15
+ series={[{ label: "Closed", tone: "info", values: [4, 7, 3, 9, 12, 8, 6, 11] }]}
16
+ />
17
+ ```
18
+
19
+ ### Do
20
+ - `buckets` are the x-axis labels in order (`W12`, `Mar`); each series' `values` has one value per bucket, in the same order. `label` names the chart.
21
+ - `series` is one or two `{ label, tone, values }`, never more; `tone` is a `VizTone`: a meaning tone, or `cat1` upwards for series that are only categories, never both in one chart. Two series draw a `Legend` under the chart; one is named by `label`.
22
+ - `kind` is `bar` (default) for a count in each bucket, or `line` for a level over time.
23
+ - Values are counts or amounts from 0 up. A negative value is drawn as 0. A missing value, a `null` or a `values` list shorter than `buckets`, draws nothing for that bucket: no bar, and the line breaks there. Values past the last bucket are ignored.
24
+ - The y-axis runs from 0 to a rounded maximum (2, 4 or 10 times a power of ten) and is labelled at 0, half and the top. With more than 8 buckets, every k-th x label is drawn, starting with the first.
25
+ - A trend inside a `StatTile` is its `trend` prop, not a chart.
26
+
27
+ ### Don't
28
+ - Do not draw a line through categories that have no order.
29
+
30
+ A line joins buckets that have an order. Through categories it draws a trend that does not exist.
31
+ ```tsx
32
+ import { TrendChart } from "@slashsuite/ui-react";
33
+
34
+ <TrendChart
35
+ label="Tickets by area"
36
+ kind="line"
37
+ buckets={["Web", "CLI", "Docs", "Infra", "Design", "Mobile"]}
38
+ series={[{ label: "Tickets", tone: "info", values: [14, 6, 11, 3, 9, 5] }]}
39
+ />
40
+ ```
41
+
42
+ ### Accessibility
43
+ - The chart is a `figure` named by `label`. The plot and its axis labels are hidden from assistive tech.
44
+ - A visually hidden table carries every figure: `label` as its caption, a column per series and a row per bucket, with an empty cell for a missing value.
45
+ - Two series are named by a `Legend`, so colour is never the only way to tell them apart.
46
+
47
+ ### Props
48
+ ### TrendChart
49
+ A chart of one or two series over ordered buckets (weeks, months), as bars or a line, on a y-axis from 0. The y-axis is labelled 0, half and a rounded maximum; the x-axis names the buckets. A screen reader gets the same figures as a table. While `loading` the frame, the bucket names and the key stay drawn and the plot is one bone, since 0 is a real value.
50
+ - buckets: readonly string[] (required). The x-axis labels, in order (`"W12"`, `"Mar"`).
51
+ - id: string. The root element's `id`: an anchor, or the target of a `for` or an `aria-describedby`.
52
+ - kind: "line" | "bar" (default bar). `bar` for a count in each bucket, `line` for a level over time.
53
+ - label: string (required). What the chart shows: its accessible name and the caption of its table.
54
+ - loading: boolean. The data is not here yet: an empty slot draws a bone of its shape, a filled one draws as usual.
55
+ Left out, the part takes the nearest loading layout's or part's; `false` opts it out inside one.
56
+ - loadingLabel: string (default Loading). What a screen reader hears while this part is loading, when its own `loading` is set.
57
+ - series: readonly [TrendSeries] | readonly [TrendSeries, TrendSeries] (required). One or two series, each `{ label, tone, values }`. A `null` value, or a `values` list shorter
58
+ than `buckets`, is missing. Two series draw a Legend under the chart.
59
+
60
+ ### Types
61
+ - TrendSeries: `{ label: string; tone: VizTone; values: readonly (number | null)[] }`. One series of a `TrendChart`: its `label` (the table's column, the Legend's entry), its colour, and one value per bucket in the buckets' order. A `null`, or a list shorter than the buckets, is a missing value.
@@ -0,0 +1,44 @@
1
+ ## Video
2
+
3
+ Group: Content
4
+
5
+ When to use: Showing a recording or a walkthrough that your app serves.
6
+
7
+ ### Use instead
8
+ - MediaTile (media-tile.md): The video is one of a set of things to open: a tile with `video`.
9
+
10
+ ### The one right way
11
+ `captions` is a WebVTT file offered as the default track; `children` is the text for a browser that cannot play it.
12
+ ```tsx
13
+ import { Video } from "@slashsuite/ui-react";
14
+
15
+ <Video src="/media/walkthrough.webm" captions="/media/walkthrough.vtt">
16
+ Your browser cannot play this video.
17
+ </Video>
18
+ ```
19
+
20
+ ### Do
21
+ - `src` is your own video file. It loads only the metadata until it is played, so the page does not pull the whole file.
22
+ - Give a `captions` WebVTT file for any video with speech; it is offered as the default track.
23
+ - `poster` is the image shown before play; use a local one.
24
+ - The children are the text for a browser that cannot play the video.
25
+
26
+ ### Don't
27
+ A video with speech and no `captions` leaves out anyone who cannot hear it.
28
+ ```tsx
29
+ import { Video } from "@slashsuite/ui-react";
30
+
31
+ <Video src="/media/walkthrough.webm" />
32
+
33
+ ```
34
+
35
+ ### Accessibility
36
+ - A native `<video controls>`: play, seek, volume and fullscreen work by keyboard through the browser's controls.
37
+ - `captions` adds a `<track kind="captions" default>`, so captions are on by default.
38
+
39
+ ### Props
40
+ ### Video
41
+ A `<video>` with controls, full width and rounded; it loads metadata only, so the page does not pull the file until it is played. `src` is the app's own video; `captions` is a WebVTT file, offered as the default track. `children` is the fallback for a browser that cannot play it.
42
+ - captions: string. A WebVTT file, offered as the default captions track.
43
+ - poster: string (native). The image shown before play; use a local one.
44
+ - src: string (required). The video file, the app's own.
@@ -0,0 +1,155 @@
1
+ # UISlash
2
+
3
+ > An opinionated UI library that is fully integrated with its theming.
4
+
5
+ UISlash is strict on purpose. It fixes the look and feel, so a site built with it, by people or by agents, looks good every time. It is not an extensible framework with every option.
6
+
7
+ The components and the themes are designed together. Every theme remaps every palette utility the components use, and the library's tests enforce it for each theme. Switching theme reskins a whole site with no component change, and there is nothing to configure.
8
+
9
+ The aim is a site built only from UISlash components, configured through props, with no custom CSS or Tailwind.
10
+
11
+ Every component has one right way to use it. There are no extension recipes and no styling escape hatches: do not restyle a component, compose the parts.
12
+
13
+ ## Install
14
+
15
+ 1. Add the components and a theme. React, React DOM and Tailwind CSS v4 are peers.
16
+ ```bash
17
+ bun add @slashsuite/ui-react @slashsuite/themes
18
+ ```
19
+
20
+ 2. Import the theme in your CSS, after Tailwind, and point Tailwind at the components' build, since it skips node_modules:
21
+ ```css
22
+ @import "tailwindcss";
23
+ @import "@slashsuite/themes/catppuccin-mocha.css";
24
+ @source "../node_modules/@slashsuite/ui-react/dist";
25
+ ```
26
+
27
+ 3. Put the theme's class on <html>. The class for each theme is listed below.
28
+
29
+ 4. Browser support is the web platform as of the Baseline digest of August 2026: current Chrome and Edge (131+), Firefox (143+) and Safari (18.4+, macOS and iOS). Older browsers and polyfills are not supported.
30
+
31
+ ### Themes
32
+ Each theme is one CSS file that remaps the components' colours under its own class, and all of them are in one package.
33
+ - Catppuccin Latte: `@slashsuite/themes/catppuccin-latte.css`; Class on <html>: `latte`.
34
+ - Catppuccin Mocha: `@slashsuite/themes/catppuccin-mocha.css`; Class on <html>: `dark`.
35
+ - Slash Suite: `@slashsuite/themes/slash-suite.css`; Class on <html>: `slash-suite`.
36
+ - Slash Suite Dark: `@slashsuite/themes/slash-suite-dark.css`; Class on <html>: `slash-suite-dark`.
37
+ - Thriftloop: `@slashsuite/themes/thriftloop.css`; Class on <html>: `thriftloop`.
38
+ - Thriftloop Dark: `@slashsuite/themes/thriftloop-dark.css`; Class on <html>: `thriftloop-dark`.
39
+ - Thrifty Paper: `@slashsuite/themes/thrifty-paper.css`; Class on <html>: `thrifty-paper`.
40
+
41
+ ## Components
42
+
43
+ Each component page is its own file under `components/`: the one right way, do and don't, accessibility and props. Read the page before you use the component.
44
+
45
+ ### Layout
46
+ - AppShell (components/app-shell.md): Every page of an app sits in one `AppShell`; it is the only place the page canvas, the font and the header live.
47
+ - SiteFooter (components/site-footer.md): The footer of a marketing site or a docs site, in `AppShell`'s `footer` slot. An app with no footer leaves the slot empty.
48
+ - StickyBar (components/sticky-bar.md): A page's filters or bulk actions that must stay in reach while a long `bleed` page scrolls.
49
+ - Container (components/container.md): Content outside an `AppShell`, such as a band in a `bleed` shell, that must start at the same x as the page.
50
+ - PageHeader (components/page-header.md): The first block of every page but a landing page, which opens with a `Hero`; it puts the page's first content at the same y on every page.
51
+ - Hero (components/hero.md): The first block of a site's landing page, and nowhere else: every other page opens with a `PageHeader`.
52
+ - Stack (components/stack.md): Any blocks that follow each other: space is a Stack's `gap`, never a margin on a block.
53
+ - Cluster (components/cluster.md): Items in a line that are not buttons: a label beside a value, an input beside its actions, a row of pills.
54
+ - SideColumn (components/side-column.md): Any main area beside a side panel, such as a thread beside its assistant or a record beside its facts; a whole page with a header is `DetailLayout`, which is this split under a `PageHeader`.
55
+ - CardGrid (components/card-grid.md): Several cards or `StatTile`s of the same weight that should sit side by side on a wide screen.
56
+ - Show (components/show.md): Content that only fits a wide screen, and its narrow-screen form: a table from `sm`, a stack of cards below it.
57
+ - Divider (components/divider.md): One line between a heading and its content, or above a footer.
58
+
59
+ ### Page layouts
60
+ - ListLayout (components/list-layout.md): An index of quotes, builds, members or any other collection; a single record is `DetailLayout`.
61
+ - DetailLayout (components/detail-layout.md): One quote, build or member, with its content in the main column and its facts in the aside.
62
+ - FormLayout (components/form-layout.md): Creating or editing a record on a page of its own.
63
+ - ProseLayout (components/prose-layout.md): Privacy, terms, help or any page that is mostly paragraphs.
64
+ - SidebarLayout (components/sidebar-layout.md): A section with several sub-pages, such as settings, where the rail is the way between them.
65
+ - DocsLayout (components/docs-layout.md): Every page of a docs site: a nav of grouped pages, an article with its own headings, and previous and next in reading order.
66
+ - FullBleedLayout (components/full-bleed-layout.md): A viewer that needs the whole width, such as a snapshot, a canvas or a player; an ordinary page is not.
67
+ - CenteredLayout (components/centered-layout.md): Sign-in, a landing page, or a not-found or error page.
68
+
69
+ ### Text
70
+ - Headings (components/headings.md): Any title on a page: the public headline, the page title, a section, a subsection.
71
+ - Prose (components/prose.md): The body of a docs page or an article, where a reader scans headings. An app screen never uses it.
72
+ - Body text (components/body-text.md): Every run of text that is not a heading: a paragraph, a supporting line, a note, a label, the line in an empty Card.
73
+ - Code (components/code.md): A command, name or path inside a sentence is `Code`; several lines of code are a `CodeBlock`.
74
+ - CodeExample (components/code-example.md): Documentation that shows a part and its source together.
75
+ - Kbd (components/kbd.md): A key or a shortcut the reader presses: `Esc`, `?`, `⌘S`.
76
+ - Markdown (components/markdown.md): Text that arrives as markdown, such as an agent's summary, shown on a page.
77
+ - TextLink (components/text-link.md): A link that sits in text. A link that must look like a button is a `Button` with `href`.
78
+ - BulletList (components/bullet-list.md): Items that read as a list of points: what changed, what to bring.
79
+ - MetaList (components/meta-list.md): The facts about a record under its title (branch, SHA, date), or a footer's row of links (Privacy, Terms, Contact).
80
+
81
+ ### Content
82
+ - Card (components/card.md): A titled block of related content: a record, a status, a list, an empty state.
83
+ - Avatar (components/avatar.md): Marking who did something or who owns something, next to their name.
84
+ - AvatarStack (components/avatar-stack.md): Who is in something (a team, the reviewers, the people on a page) where one row says it.
85
+ - Badge (components/badge.md): A count of unread or pending things that sits on an icon button.
86
+ - Pill (components/pill.md): A short word that says what state or kind something is: paid, draft, flaky.
87
+ - Steps (components/steps.md): The way into a product: install, log in, run.
88
+ - Timeline (components/timeline.md): A history of what happened and when: status changes, a record's activity.
89
+ - Disclosure (components/disclosure.md): Detail the person may not need on first sight: a history, an FAQ answer, the fine print.
90
+ - KeyValueList (components/key-value-list.md): A set of facts about one thing: size, status, dates, shortcut keys.
91
+ - Video (components/video.md): Showing a recording or a walkthrough that your app serves.
92
+ - Image (components/image.md): Showing a picture that your app serves: a screenshot, a QR code, a product shot.
93
+ - MediaTile (components/media-tile.md): A photo or video in a grid or a strip, that opens full size when it is picked: a status, a gallery, an attachment.
94
+ - ScrollStrip (components/scroll-strip.md): A row of media or people that is longer than the page is wide: recent statuses, a team.
95
+ - ChatThread (components/chat-thread.md): Holding the messages and tool calls of a chat, an agent log or a message thread.
96
+ - ChatMessage (components/chat-message.md): A message from a person or an assistant inside a `ChatThread`.
97
+ - ChatComposer (components/chat-composer.md): The foot of a chat, under the `ChatThread`.
98
+ - OutlineRegion (components/outline-region.md): Marking an area of a screenshot or an image: one that is ignored, flagged or picked.
99
+
100
+ ### Actions
101
+ - Button (components/button.md): An action that changes something in place: save, cancel, delete, retry.
102
+ - IconButton (components/icon-button.md): An action with a familiar icon and no room for a word: delete, settings, alerts.
103
+ - Menu (components/menu.md): A row, card or header with more actions than fit: put the one main action in view and the rest in a Menu.
104
+ - Icon (components/icon.md): A glyph beside text or inside a control: a flag in a row, a camera in a Button, or a feature icon (`name` at `feature` size) that stands for an idea.
105
+ - CopyButton (components/copy-button.md): A value the page already shows that a reader will paste elsewhere.
106
+ - CopyLine (components/copy-line.md): A command or token a reader pastes elsewhere.
107
+ - ColourSchemeToggle (components/colour-scheme-toggle.md): A site that offers both schemes: one toggle in the header or controls.
108
+
109
+ ### Forms
110
+ - Field (components/field.md): Every text, select or file control: it gets a label, visible unless its purpose is plain from what surrounds it.
111
+ - Input (components/input.md): A short piece of text: a name, an amount, a search term.
112
+ - Textarea (components/textarea.md): Text that runs to a sentence or a paragraph: a review, a note, a message.
113
+ - Select (components/select.md): One choice from a list of about five or more: a category, a country, a rating.
114
+ - Checkbox (components/checkbox.md): An on/off option the person ticks: a setting, a filter, a row to select.
115
+ - Switch (components/switch.md): A setting that acts the moment it is flipped, usually by saving it to a server: a flag per environment, notifications on or off.
116
+ - RadioGroup (components/radio-group.md): A setting or answer with two to five options the person should see side by side: a visibility, a delivery method, a type.
117
+ - FileDrop (components/file-drop.md): Uploading a file: a statement, a photo, an import.
118
+ - FormRow (components/form-row.md): `FormGrid` lays Fields out in two columns; `FormRow` puts several controls and a save button on one line.
119
+ - DateField (components/date-field.md): Any date a person enters; leave `calendar` off for a date the person knows by heart.
120
+ - DateRangePicker (components/date-range-picker.md): A from and to date: a report period, a timeline filter.
121
+ - SegmentedControl (components/segmented-control.md): A mode or a range chosen in place: daily or weekly, split or even.
122
+ - Fieldset (components/fieldset.md): Several controls that answer one question or belong together, under one name.
123
+
124
+ ### Data
125
+ - Table (components/table.md): Records that share columns, where a person compares values down a column.
126
+ - ListRow (components/list-row.md): A short list where each row opens something, toggles a section or holds its own buttons.
127
+ - SortableList (components/sortable-list.md): A list the user puts in order, such as a priority queue: tasks under priority bands, the next one on top.
128
+ - StatTile (components/stat-tile.md): A single number a person should see first: a total, a date, a balance.
129
+ - ProgressBar (components/progress-bar.md): How far something has got toward a whole: money saved, steps done.
130
+ - SplitBar (components/split-bar.md): Two sides of one total: a pot split between two goals, for and against.
131
+ - StackedBar (components/stacked-bar.md): The make-up of one whole in three or more parts: results by status, spend by group.
132
+ - TrendChart (components/trend-chart.md): A figure over ordered time buckets: weekly counts, a trend.
133
+
134
+ ### Feedback
135
+ - Callout (components/callout.md): A message the reader should see in the page, without being made to answer it.
136
+ - Toast (components/toast.md): A confirmation or an offer that should not move the page: Saved, Copied, Update available.
137
+ - EmptyState (components/empty-state.md): A whole page or list with no content yet: say what belongs here and offer the first step.
138
+ - Loading (components/loading.md): Data that is on its way: give the layout or the part `loading` and keep the tree it draws with data.
139
+ - Dialog (components/dialog.md): A confirmation or a short form the reader must answer before they go on.
140
+ - Drawer (components/drawer.md): A record or a form the reader works on beside the page, with actions that stay in view.
141
+ - BottomSheet (components/bottom-sheet.md): A list or details over a full-screen view (a map, a canvas) that must stay usable behind it.
142
+ - Lightbox (components/lightbox.md): Showing a photo or a video at full size, and stepping through a set of them.
143
+ - FieldDialog (components/field-dialog.md): Asking for a single name or value: new project, rename, a label.
144
+ - PageFade (components/page-fade.md): A site where the frame stays put and only the content between pages should fade.
145
+ - Morph (components/morph.md): A card or thumbnail that opens into its own page, where the reader should see the one become the other.
146
+ - NavigationProgress (components/navigation-progress.md): A page load of unknown length: show at once that the click did something, until the next page renders.
147
+
148
+ ### Navigation
149
+ - Tabs (components/tabs.md): Tabs switch a panel on the same page. A row of links to other pages is `Tabs` with link items.
150
+ - Breadcrumbs (components/breadcrumbs.md): A page several levels deep that needs a way back up: org, project, build, snapshot.
151
+ - Pagination (components/pagination.md): A list split into pages that the reader moves through: a directory, search results, an archive.
152
+ - SiteSearch (components/site-search.md): A site with more pages than a reader can scan in its nav: a docs site, an app with many sections.
153
+
154
+ ### Pages
155
+ - Status pages (components/status-pages.md): A route that cannot show its content: use the status page that names the state.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@slashsuite/ui-react",
3
- "version": "0.11.3",
3
+ "version": "0.12.1",
4
4
  "description": "UISlash React components: primitives, typography roles and a safe Markdown renderer, written against Tailwind v4 utilities. Pair with a theme from @slashsuite/themes.",
5
5
  "keywords": [
6
6
  "components",
@@ -28,6 +28,8 @@
28
28
  },
29
29
  "files": [
30
30
  "dist",
31
+ "agent-docs",
32
+ "skills",
31
33
  "MIGRATING.md"
32
34
  ],
33
35
  "type": "module",
@@ -45,8 +47,9 @@
45
47
  "typecheck": "tsc --noEmit",
46
48
  "lint": "oxlint -c .oxlintrc.json --type-aware --deny-warnings --report-unused-disable-directives && bun ../../scripts/check-slop.ts",
47
49
  "test": "vitest run",
48
- "pack-check": "npm pack --dry-run --ignore-scripts && bun scripts/consumer-types.ts",
49
- "prepack": "bun run build"
50
+ "agent-docs": "bun ../../apps/hack-cove-site/scripts/agent-docs.ts",
51
+ "pack-check": "npm pack --dry-run --ignore-scripts && bun scripts/pack-docs.ts && bun scripts/consumer-types.ts",
52
+ "prepack": "bun run build && bun run agent-docs"
50
53
  },
51
54
  "dependencies": {
52
55
  "@internationalized/date": "^3.12.4",
@@ -0,0 +1,20 @@
1
+ ---
2
+ name: uislash
3
+ description: Builds React pages with UISlash (@slashsuite/ui-react). Use whenever a project has @slashsuite/ui-react installed or the user mentions UISlash.
4
+ ---
5
+
6
+ # Build with UISlash
7
+
8
+ UISlash is a strict React component library. Every component has one right way to use it, and a page is built only from its components configured through props: no `className`, no `style`, no raw `<button>`, `<input>`, `<label>` or `<table>`, no custom CSS.
9
+
10
+ ## Read first
11
+
12
+ The docs for the installed version ship in the package, as Markdown, under `node_modules/@slashsuite/ui-react/`:
13
+
14
+ - `agent-docs/llms.txt` is the index: install, the themes and one line per component page. Read it first.
15
+ - Then read only the pages your task needs, each at `agent-docs/components/<slug>.md`, like `agent-docs/components/table.md`.
16
+ - Don't read `README.md` or the compiled JavaScript in `dist/`. The docs pages and the `.d.ts` types are the API.
17
+
18
+ ## When you're done
19
+
20
+ Typecheck the way the project does: its `typecheck` script if `package.json` has one. Without one, run `npx tsc -b` when the root `tsconfig.json` only lists `references` (as a Vite app's does: plain `tsc --noEmit` checks no files there), and `npx tsc --noEmit` otherwise. Fix what it reports.