Call to action block
A closing call to action with one sentence and one next step.
SourceStyles source@monoline/react 0.5.0Markdown for AI toolsbeta
- Built on native elements
- A section named by its title; actions are ordinary buttons or links.
- Styles in one file:
container.css
Import
import '@monoline/css';
import {BlockCta} from '@monoline/react';
Not installed yet? Pick a route.
Copies the source and its styles into your project.
npx monoline add block-cta
Usage
import {BlockCta, Button} from '@monoline/react';
<BlockCta
title="Start building today"
description="Install the package and copy your first component."
actions={<><Button variant="solid">Get started</Button><Button variant="line">Read the docs</Button></>}
/>
Examples
Default
Props
BlockCtaProps
| Prop | Type | Default | Description |
|---|---|---|---|
title required | ReactNode | – | The one-sentence call to action, rendered as the section heading. |
description | ReactNode | – | Optional muted supporting line under the title. |
actions required | ReactNode | – | The next step: a solid Button and maybe a line one. |
headingLevel | 1 | 2 | 3 | 4 | 5 | 2 | Outline level of the title, 1 to 5. Default 2. |
Data Attributes
State is exposed through attributes. Style it with these selectors, not with class toggles.
This component sets no state attributes.
CSS classes
| Class | Stylesheet |
|---|---|
.container | container.css |
.container-full | container.css |
.container-page | container.css |
.container-text | container.css |
.heading | heading.css |
.heading-display | heading.css |
.heading-lg | heading.css |
.heading-md | heading.css |
.heading-sm | heading.css |
.heading-xl | heading.css |
.text | text.css |
.text-accent | text.css |
.text-danger | text.css |
.text-full | text.css |
.text-lg | text.css |
.text-md | text.css |
.text-muted | text.css |
.text-ok | text.css |
.text-sm | text.css |
.text-success | text.css |
.text-truncate | text.css |
.text-warning | text.css |
.text-xs | text.css |
.btn | 02-buttons.css |
.btn-block | 02-buttons.css |
.btn-danger | 02-buttons.css |
.btn-ghost | 02-buttons.css |
.btn-lg | 02-buttons.css |
.btn-line | 02-buttons.css |
.btn-sm | 02-buttons.css |
.btn-solid | 02-buttons.css |
.block-cta | block-cta.css |
.block-cta-actions | block-cta.css |
.block-cta-box | block-cta.css |
.block-cta-copy | block-cta.css |
Customization
Style it with the kit's tokens in your own CSS, loaded after @monoline/css. Prefer the attributes above over extra classes. See Theming for every token.
app.css
.container {
border-color: var(--accent);
}
Accessibility
- A section named by its title; actions are ordinary buttons or links.