Component docs
Loading
import { CodeFrame } from "@pixxl-tools/components";
// In Server Components:
import { CodeFrame } from "@pixxl-tools/components/server";| Prop | Type | Default | Description |
|---|---|---|---|
actions | ReactNode | — | Action slot (buttons or links). |
maxHeight | number | string | — | Maximum frame height; numbers become px values. |
actionsReactNode
Action slot (buttons or links).
maxHeightnumber | string
Maximum frame height; numbers become px values.
Other props are passed to the root element (HTMLAttributes<HTMLElement>), including className, style, id and aria-* attributes.
npm testconst code = "pnpm add @pixxl-tools/components";
const copy = <ClipboardButton value={code} />;
<CodeFrame actions={copy}><code>{code}</code></CodeFrame>