Skip to content

    Browse components

    Focus Outline

    A soft, glowing outline that snaps into razor focus wherever the cursor comes near. WebGL signed distance fields.

    Focus

    Open
    Customize
    rounded
    circle
    nested

    Installation

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

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

    Usage

    import { FocusOutline } from "@/components/ui/focus-outline";
    
    <div className="relative h-96">
      <FocusOutline shape="rounded" />
    </div>

    Props

    PropTypeDefaultDescription
    shape"rounded" | "circle" | "nested""nested"Outline shape.
    colorstring"#c6ff3d"Outline color.
    accentstring"#22d3ee"Second color the outline shifts toward around its perimeter.
    sizenumber0.62Shape size as a fraction of the shorter side.
    thicknessnumber2Outline width in px when fully sharp.
    blurnumber26Blur radius in px away from the cursor.
    focusnumber170Px around the cursor where the outline comes into focus.
    classNamestring—Extra classes for the root element.