Skip to content

    Browse components

    Rise Chars

    Characters stretch, rise and fade into place one after another, scrubbed by scroll position inside any scroll container.

    Open
    Customize

    Installation

    npx shadcn@latest add @glint-ui/rise-chars

    First time using @glint-ui? Add the registry to components.json once, or install by URL: npx shadcn@latest add https://glintui.vercel.app/r/rise-chars.json

    Usage

    import { RiseChars } from "@/components/ui/rise-chars";
    
    const scroller = useRef<HTMLDivElement>(null);
    
    <div ref={scroller} className="h-96 overflow-y-auto">
      <div className="h-80" />
      <RiseChars text="Scroll to float" scrollContainerRef={scroller} />
    </div>

    Props

    PropTypeDefaultDescription
    textstring"Scroll to float"Text to animate.
    startnumber0.95Animation starts when the text top reaches this fraction of the viewport height.
    endnumber0.45Every character has landed at this fraction of the viewport height.
    staggernumber0.04Progress offset between consecutive characters.
    scrollContainerRefReactNode—Ref to the scrolling element. Defaults to the window.
    as"h1" | "h2" | "h3" | "p" | "div""h2"Element to render.
    classNamestring—Extra classes for the root element.