Skip to content

    Browse components

    Bleed Reveal

    A media card that grows from an inset, rounded frame to full-bleed as you scroll, splitting its headline apart.

    Open
    Customize

    Installation

    npx shadcn@latest add @glint-ui/bleed-reveal

    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/bleed-reveal.json

    Usage

    import { BleedReveal } from "@/components/ui/bleed-reveal";
    
    const box = useRef<HTMLDivElement>(null);
    
    <div ref={box} className="h-[32rem] overflow-y-auto">
      <BleedReveal src="/cover.jpg" title="Into the wild" scrollContainerRef={box}>
        <p>Revealed at full size</p>
      </BleedReveal>
    </div>

    Props

    PropTypeDefaultDescription
    srcstring—Image URL.
    titlestring"Into the wild"Headline; its halves slide apart as the media expands.
    childrenReactNode—Content faded in once the media is full-bleed.
    startInsetnumber24Starting inset as a percent of the width.
    radiusnumber32Starting corner radius in px.
    scrollLengthnumber1.5Scroll distance to fully expand, in viewport heights.
    scrollContainerRefReactNode—Ref to the element that scrolls. Defaults to the window.
    classNamestring—Extra classes for the root element.