Krizaka
Documentation

Call-to-action panel

The invitation at the end of a section or a page: a title, why it matters, the ways to answer — in the hue of the page.

WebBetaBlocks

Web only — React, from @krizaka/ui/cta-panel. Beta: its API may still change in a minor version.

When to use

  • The end of a page that argued: discuss, propose, contact, get started.
  • The end of a section that asks the reader for something.

When not to use

  • For a message about the state of the app.Use instead: Alert
  • For a whole closing section on the brand's gradient.Use instead: Page

Installation

Install

npm install @krizaka/ui @krizaka/tailwind @krizaka/tokens tailwindcss

Styles

@import "tailwindcss";
@import "@krizaka/tailwind";
@import "@krizaka/ui/tailwind.css";

Import

import { CtaPanel } from "@krizaka/ui/cta-panel";

Examples

Discuss

The end of a building block's page: discuss or propose.

Something to say about it?

A decision you would make differently, a starter you miss: the discussions are open, and every idea gets an answer.

Props

A call to act: title, why, the actions — the closing panel of a section or a page.

PropTypeDefaultDescription
titlerequiredReactNode—The invitation: Something to say about it?.
bodyReactNode—Why it matters, in one or two sentences.
level2 | 32The title's level.
revealboolean—Rises once into place ([data-reveal]). Never on the first screen.

Accessibility

  • Its title is a real heading (h2 or h3): it appears in the page's outline.
  • The tint is decorative; text stays in the text roles (AA).

Best practices

  • One invitation per panel, one or two actions (an ActionBar).
  • Say why answering matters to the reader, not to you.
  • Give it an id when other pages link to it (#discuss).

Generated from the code of @krizaka/ui 2.8.0: its meta.ts, its examples and its types.Edit this documentation on GitHub

On this page