Zum Hauptinhalt springen

Get Involved

Whether you are a developer, designer, writer, project builder, or just someone passionate about Cardano.

Title With Text

Title With Text

<TitleWithText> renders a title followed by body text, and optionally a call-to-action button. It is one of the most-used building blocks for React pages.

Basic Usage

<TitleWithText
title="What is Cardano?"
description="A proof-of-stake blockchain platform for changemakers, innovators, and visionaries."
/>

Props

PropTypeDefaultDescription
titlestringThe heading. Rendered as an <h1>, so treat it as the primary heading of its section.
descriptionstring | array | objectBody content (see formats below).
titleType"red" | "green" | (other)blackTitle color. Any other value renders the default black.
headingDotbooleanfalseAdds the decorative leading dot to the title.
slightTextstring[]Extra muted lines rendered below the description.
buttonLabelstringCall-to-action label. Requires buttonLink to appear.
buttonLinkstringDestination for the button. Requires buttonLabel.

Description formats

description accepts three shapes, and text runs through basic Markdown parsing (bold, links):

  • String renders as a paragraph:

    <TitleWithText title="Governance" description="Ada holders shape the platform." />
  • { list: [...] } renders a bullet list:

    <TitleWithText
    title="Why Cardano"
    description={{ list: ["Peer-reviewed research", "Formal methods", "Sustainable"] }}
    />
  • Array renders each entry in order (mix paragraphs and lists):

    <TitleWithText
    title="Overview"
    description={["An intro paragraph.", { list: ["Point one", "Point two"] }]}
    />

With a call-to-action

<TitleWithText
title="Get started"
description="Set up a wallet and receive your first ada."
buttonLabel="Get a wallet"
buttonLink="/what-is-a-wallet"
/>