10% off on all-access. Use code SUPER10.
    d :
    h :
    m :
    Logo

    Canvas Text

    Animated text component with colorful curved lines rendered on canvas, clipped to the text shape.

    Ship landing pages at Lightning Speed

    Installation

    Run the following command

    npx shadcn@latest add @aceternity/canvas-text

    Examples

    Standard

    Aceternity

    With text

    Ship landing pages at Lightning Speed

    Props

    PropTypeDefaultDescriptionRequired
    textstring-The text to display with animated background.Yes
    classNamestring""Additional CSS classes for the text element.No
    backgroundClassNamestring"bg-white dark:bg-neutral-950"Tailwind classes to determine background color for dark mode.No
    colorsstring[]["#ff6b6b", "#4ecdc4", "#45b7d1", "#96ceb4", "#ffeaa7", ...]Array of colors for the animated lines. Supports CSS variables.No
    animationDurationnumber5Duration in seconds for one complete animation cycle.No
    lineWidthnumber1.5Width of the animated lines in pixels.No
    lineGapnumber10Vertical gap between lines in pixels.No
    curveIntensitynumber60Intensity of the bezier curve animation.No
    overlaybooleanfalseIf true, positions the component absolutely for overlay use cases.No

    CSS Variable Colors

    You can use Tailwind CSS variables for colors:

    <CanvasText
      text="Colorful Text"
      colors={[
        "var(--color-blue-500)",
        "var(--color-sky-500)",
        "var(--color-violet-500)",
        "var(--color-teal-500)",
      ]}
    />

    Dark Mode

    The component automatically adapts to dark mode by detecting the backgroundClassName prop. Pass your page's background color classes to ensure proper rendering:

    <CanvasText
      text="Dark Mode Ready"
      backgroundClassName="bg-white dark:bg-neutral-950"
    />

    Build websites faster and 10x better than your competitors with

    Aceternity UI Pro

    Next.js 15, Tailwind CSS v4 and Motion for react powered templates

    100+ templates and blocks combined

    Ready to copy paste component blocks, save days of development time

    Aceternity UI Pro Demo - Light Mode
    Logo
    Aceternity UI

    Access an ever-growing collection of premium, meticulously crafted templates and Component Blocks.

    A product by Aceternity
    Building in public at @mannupaaji

    © 2026 Aceternity Labs LLC. All Rights Reserved.