import { CallToAction } from "@pixxl-tools/components";
// In Server Components:
import { CallToAction } from "@pixxl-tools/components/server";| Prop | Type | Default | Description |
|---|---|---|---|
title (required) | ReactNode | — | Title (any content). |
actions | ReactNode | — | Action slot (buttons or links). |
align | "center" | "start" | center | Cross-axis alignment of the children. |
description | ReactNode | — | Supporting text. |
variant | "accent" | "outline" | "soft" | "solid" | soft | soft (accent tint, default), solid (filled) or outline; accent is a deprecated alias of solid. |
headingAs | HeadingElement | — | — |
titlerequiredReactNode
Title (any content).
actionsReactNode
Action slot (buttons or links).
aligndefault center"center" | "start"
Cross-axis alignment of the children.
descriptionReactNode
Supporting text.
variantdefault soft"accent" | "outline" | "soft" | "solid"
soft (accent tint, default), solid (filled) or outline; accent is a deprecated alias of solid.
headingAsHeadingElement
Other props are passed to the root element (HTMLAttributes<HTMLElement>), including className, style, id and aria-* attributes.
Install the package and import the styles.
Complex object props use fixed fixtures. Primitive props stay editable.
<CallToAction title="Start a project" variant="soft" align="center" description="Install the package and import the styles." actions={<Button>Install</Button>} />Install the package and import the stylesheet once.
<CallToAction title="Ready to try it?" description="…" actions={<ActionLink href="/start">Start now</ActionLink>} />Install the package and import the styles.
<CallToAction title="Start a project" variant="soft" align="center" description="Install the package and import the styles." actions={<Button>Install</Button>} />