Centered Text

A centered text block with a title, description, and optional CTA.

Loading block…

Implementation

npx shadcn@latest add @flx/centered-text

Usage

centered-text-example.tsx
import { CenteredText, type CenteredTextProps } from './centered-text'

export function CenteredTextExample() {
  const values = {
    title: 'Simple & Elegant',
    description: 'Display content in a minimal and visually appealing way.',
    cta: {
      ctaEnabled: true,
      text: 'Click here',
      link: '/',
      variant: 'default',
    },
  } satisfies CenteredTextProps

  return (
    <CenteredText
      title={values.title}
      description={values.description}
      cta={values.cta}
    />
  )
}