Skip to Content

Text

Paragraph component for hero and section descriptions: body copy, lead text and subtitles under a heading. Two sizes, regular and lead, in your text color or muted. Renders a p, or a div for several paragraphs.

pnpm dlx shadcn add @01orbital/text

Usage

import { Text } from "@/components/text/text"

const COPY = {
  md: "Plan the work, share the context and keep decisions close to the people making them.",
  lg: "Orbcore keeps the plan, the review and the handoff in one place, so your team ships without chasing each other.",
}

export default function TextDemo() {
  return (
    <div className="grid w-full max-w-2xl gap-8 p-6">
      <Text>{COPY.md}</Text>
      <Text size="lg" variant="muted">
        {COPY.lg}
      </Text>
    </div>
  )
}

API reference

The paragraph under a heading, a p by default. For several paragraphs, pass render={<div />} and put your own p elements inside.

size sets the text: md (the default) 16px with 28px lines, lg 18px with 32px lines for the lead under a page headline. variant="muted" uses the muted text color; the default inherits the ink around it.

Prop

Type

It also accepts the props of the Base UI part it wraps, and the HTML attributes of the element it renders.

Dependencies

npm: @base-ui/react, class-variance-authority, cn. The CLI installs them for you.

No other registry pieces.