Component docs
Loading
import { Highlight } from "@pixxl-tools/components";
// In Server Components:
import { Highlight } from "@pixxl-tools/components/server";| Prop | Type | Default | Description |
|---|---|---|---|
as | "mark" | "span" | — | Element to render. |
tone | Extract<ComponentTone, "neutral" | "primary" | "danger" | "warning"> | — | Colour role (neutral, primary, danger, success, warning, info). |
as"mark" | "span"
Element to render.
toneExtract<ComponentTone, "neutral" | "primary" | "danger" | "warning">
Colour role (neutral, primary, danger, success, warning, info).
Other props are passed to the root element (HTMLAttributes<HTMLElement>), including className, style, id and aria-* attributes.
Saved draft
<Highlight>draft</Highlight>