Component docs
Loading
import { TypeSignature } from "@pixxl-tools/components";
// In Server Components:
import { TypeSignature } from "@pixxl-tools/components/server";| Prop | Type | Default | Description |
|---|---|---|---|
children (required) | string | — | Signature text (keeps copy exact). |
label | ReactNode | — | Visible label above the signature (e.g. "Type"). Without one, an aria-label (which names the figure) names the copy button too. |
copyable | boolean | — | Show a copy button. |
language | string | — | — |
childrenrequiredstring
Signature text (keeps copy exact).
labelReactNode
Visible label above the signature (e.g. "Type"). Without one, an aria-label (which names the figure) names the copy button too.
copyableboolean
Show a copy button.
languagestring
Other props are passed to the root element (HTMLAttributes<HTMLElement>), including className, style, id and aria-* attributes.
useBreakpoint(breakpoint: "sm" | "md" | "lg" | "xl", options?: UseBreakpointOptions): booleanComplex object props use fixed fixtures. Primitive props stay editable.
<TypeSignature label="Signature" copyable>{signature}</TypeSignature>(series: Point[] | Point[][], options?: { width?: number; height?: number; color?: "ansiRed" | "ansiGreen" }) => stringconst signature = "(value: string, options?: { trim?: boolean }) => string";
<TypeSignature label="Type" copyable>{signature}</TypeSignature>useBreakpoint(breakpoint: "sm" | "md" | "lg" | "xl", options?: UseBreakpointOptions): booleanconst signature = "(value: string, options?: { trim?: boolean }) => string";
<TypeSignature label="Signature" copyable>{signature}</TypeSignature>