dixant

Typography

Text

About

A polymorphic text component with semantic heading/body/caption variants, weight, alignment, truncation and line-clamp options for consistent typographic styles.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Typography to your project and fits it to your theme.

Code

How Typography is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

import { Typography } from "@/components/ui/typography";

export default function TypographyDemo() {
  return (
    <div style={{ display: "grid", gap: 12 }}>
      <Typography variant="h1">Heading 1</Typography>
      <Typography variant="h2">Heading 2</Typography>
      <Typography variant="h3">Heading 3</Typography>
      <Typography variant="h4">Heading 4</Typography>
      <Typography variant="h5">Heading 5</Typography>
      <Typography variant="h6">Heading 6</Typography>
      <Typography variant="body1">Body 1 — regular paragraph text.</Typography>
      <Typography variant="body2">Body 2 — smaller paragraph text.</Typography>
      <Typography variant="caption">Caption text</Typography>
      <Typography variant="overline">OVERLINE</Typography>
    </div>
  );
}

More by dixant

View all
  • Tooltip

    Tooltip

    1
  • Select

    Select

  • Avatar

    Avatar

  • Stack

    Stack

  • Pagination

    Pagination

  • Skeleton

    Skeleton

  • Radio Group

    Radio Group

  • Icon

    Icon

More in Text

View all
  • Motion Blur Text

    Motion Blur Text

    45
  • Rainbow Text Effect

    Rainbow Text Effect

    58
  • Short Slide Down

    Short Slide Down

    45
  • Blur Reveal

    Blur Reveal

    72
  • Text Reveal

    Text Reveal

    29
  • Apple Hello Effect

    Apple Hello Effect

    659
  • Text Highlight

    Text Highlight

    96
  • Scroll Fill Headline

    Scroll Fill Headline

    13