labsUI
Accent color

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.

npx @kznlabs/labsui add props-table
  • signal required
    AbortSignal
    Stops waiting between tries.
  • attemptsDefault 3
    number
    Tries before retry gives up and rethrows the last error.
  • backoffDefault "exponential"
    "fixed" | "linear" | "exponential"
    How the wait grows after each try.
OptionTypeDefault
signal required
Stops waiting between tries.
AbortSignal—
attempts
Tries before retry gives up and rethrows the last error.
number3
backoff
How 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 required
    string
    Accessible name of the list shown in a narrow container.
  • rows required
    PropsTableRow[]
    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"
    string
    Explains the star on required rows.
PropTypeDefault
label required
Accessible name of the list shown in a narrow container.
string—
rows required
One row per prop or option.
PropsTableRow[]—
labels
Column headings, e.g. { name: "Option" } for a function's options.
{ name?: string | undefined; type?: string | undefined; default?: string | undefined; }—
requiredLabel
Explains 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.