PropsTable
The reference table a docs page prints for props, options, fields or a request body.
| Name | Type | Default | Required | Description | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
url | string | — | Yes | The address every probe requests. | ||||||||||||||||||||
method | "GET" | "HEAD" | "POST" | "PUT" | "PATCH" | "DELETE" | "GET" | No | The HTTP method each probe sends. | ||||||||||||||||||||
intervalSeconds | number | 60 | No | How often each region probes. | ||||||||||||||||||||
assertions | object | — | No | What a response must satisfy to count as up. | ||||||||||||||||||||
Show child parametersHide child parameters
| ||||||||||||||||||||||||
View code
<PropsTable
aria-label="HTTP monitor fields"
labels={labels}
rows={[
{ name: "url", type: "string", required: true, description: "The address every probe requests." },
{ name: "method", type: '"GET" | "HEAD" | "POST" | …', default: '"GET"', description: "…" },
{ name: "assertions", type: "object", description: "…", children: [
{ name: "status", type: "number", default: "200", description: "The status code to expect." },
] },
]}
/>Demo docs sites
Whole pages built only from @sdxc/ui, each for an invented product with its own palette and type. They open in a new tab.
- Content docsDriftwood DocsGuides for Driftwood, a command line that deploys static sites: a tutorial, how-to guides and concept pages./demo/docs/driftwood
- Component docsLattice DocsDocs for Lattice UI, a component library: an index of components, each with live previews, props and accessibility notes./demo/docs/lattice
- API referenceParcelo DocsThe HTTP API reference for Parcelo, a shipping-label API: resources, endpoints with request and response fields, and examples in three languages./demo/docs/parcelo
- Utilities docsTempo DocsReference for Tempo, an invented library of CSS utilities: every spacing, colour, layout, type and effect utility drawn beside its call and the CSS it emits./demo/docs/tempo
Every demo, landings and docs sites alike, is listed in the demo gallery.
Installation
An ordinary dependency: install it, import the theme once, and import the component where it is used.
npm add @sdxc/ui remiximport "@sdxc/ui/theme.css";Usage
import { PropsTable } from "@sdxc/ui/docs";Renders the table inside a box that is its own size container. Above 36rem it reads as five columns; at or below, each row stacks with the column label before each value. A long type wraps inside its cell, so the table never widens the page.
Props
Read from the component's own types, so every prop, every default and every allowed value is listed.
| Prop | Type | Required | Description |
|---|---|---|---|
rows | readonly Row[] | Yes | |
labels | Labels | Yes | |
"aria-label" | string | No | Names the table for a reader who reaches it without the heading above it. |
Also accepts everything in Omit<TagProps<"div">, "children">.