Skip to content

    Browse components

    Refract Panel

    A liquid-glass panel whose rim bends the backdrop through an SVG displacement map, with chromatic fringes, blur and a specular edge.

    Open
    Customize

    Installation

    npx shadcn@latest add @glint-ui/refract-panel

    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/refract-panel.json

    Usage

    import { RefractPanel } from "@/components/ui/refract-panel";
    
    <RefractPanel className="w-80 p-6" radius={28}>
      <p>Now playing</p>
    </RefractPanel>

    Props

    PropTypeDefaultDescription
    childrenReactNode—Panel content.
    radiusnumber28Corner radius in px.
    bezelnumber26Width of the refracting rim in px.
    refractionnumber70Strength of the rim refraction in px.
    aberrationnumber3Px of chromatic split at the rim.
    blurnumber2Backdrop blur in px.
    saturationnumber1.6Backdrop saturation multiplier.
    tintnumber0.06Opacity of the white tint.
    classNamestring—Extra classes for the root element.