Skip to content

    Browse components

    Bracket Focus

    One word at a time snaps into focus inside gliding corner brackets while the rest of the sentence blurs.

    Open
    Customize

    auto
    hover

    Installation

    npx shadcn@latest add @glint-ui/bracket-focus

    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/bracket-focus.json

    Usage

    import { BracketFocus } from "@/components/ui/bracket-focus";
    
    <BracketFocus text="Focus on what matters" mode="auto" />

    Props

    PropTypeDefaultDescription
    textstring"Focus on what matters"Sentence to split into words.
    blurnumber5Blur of unfocused words, in px.
    intervalnumber1800Ms per word in auto mode.
    durationnumber550Ms for the frame to travel.
    mode"auto" | "hover""auto"Cycle on its own or follow the pointer.
    colorstring"#bef264"Corner bracket color.
    classNamestring—Extra classes for the root element.