Skip to content

    Browse components

    Badge Strap

    An ID badge hanging from a woven strap with verlet rope physics. Grab it, fling it and watch it swing back.

    Open
    Customize

    Installation

    npx shadcn@latest add @glint-ui/badge-strap

    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/badge-strap.json

    Usage

    import { BadgeStrap } from "@/components/ui/badge-strap";
    
    <div className="relative h-[32rem]">
      <BadgeStrap name="Ada Park" role="Design Engineer" image="/me.jpg" />
    </div>

    Props

    PropTypeDefaultDescription
    namestring"Ada Park"Name printed on the badge.
    rolestring"Design Engineer"Role printed under the name.
    imagestring—Photo URL for the badge.
    strapColorstring"#c6f24e"Strap and header color.
    ropeLengthnumber170Strap length in px.
    badgeWidthnumber180Badge width in px.
    gravitynumber1Gravity multiplier.
    childrenReactNode—Replace the default badge face.
    classNamestring—Extra classes for the root element.