Props Table
The props or options of a component or function from rows of data: name, type, default and a description where backticks become code. A table, or a list where the container is too narrow for one. Server-safe.
signal requiredAbortSignalStops waiting between tries.attemptsDefault3numberTries beforeretrygives up and rethrows the last error.backoffDefault"exponential""fixed" | "linear" | "exponential"How the wait grows after each try.
| Option | Type | Default |
|---|---|---|
signal requiredStops waiting between tries. | AbortSignal | — |
attemptsTries before retry gives up and rethrows the last error. | number | 3 |
backoffHow the wait grows after each try. | "fixed" | "linear" | "exponential" | "exponential" |
required
import { PropsTable } from "@/components/ui/props-table";export function RetryOptions() { return ( <PropsTable label="Retry options" labels={{ name: "Option" }} rows={[ { name: "signal", type: "AbortSignal", required: true, description: "Stops waiting between tries.", }, { name: "attempts", type: "number", default: "3", description: "Tries before giving up.", }, ]} /> );}<PropsTable>
The props or options of a component or function: a table, or a list where the container is too narrow for one. Server-safe.
label requiredstringAccessible name of the list shown in a narrow container.rows requiredPropsTableRow[]One row per prop or option.labels{ name?: string | undefined; type?: string | undefined; default?: string | undefined; }Column headings, e.g.{ name: "Option" }for a function's options.requiredLabelDefault"required"stringExplains the star on required rows.
| Prop | Type | Default |
|---|---|---|
label requiredAccessible name of the list shown in a narrow container. | string | — |
rows requiredOne row per prop or option. | PropsTableRow[] | — |
labelsColumn headings, e.g. { name: "Option" } for a function's options. | { name?: string | undefined; type?: string | undefined; default?: string | undefined; } | — |
requiredLabelExplains the star on required rows. | string | "required" |
required
Also accepts every <div> prop.
inlineCode()
Text with its backticks turned into inline code and its line breaks into spaces.
inlineCode(text: string) => ReactNode
- type PropsTableRow
- { name: string; type: string; required?: boolean; default?: string; description?: ReactNode; }
Every component also takes className.