uibrik

Light Badge

Preview

Customize

Ocean
Stroke1.50px
Radius16px
Ray0.55
Inner0.50
Ray length11px
Period3.6s
Hover intensity0.40
Hover speed0.45
Follow strength0.30
Follow range220px

Usage

import { GradientStrokePill } from "@/components/uibrik/light-badge/GradientStrokePill";

<GradientStrokePill>…</GradientStrokePill>

Installation

npx shadcn@latest add https://uibrik.com/r/light-badge.json
Adds the files to components/uibrik/light-badge. With the @uibrik namespace set up: npx shadcn@latest add @uibrik/light-badge.

Props

GradientStrokePill
hover
Type boolean
true
Brighten and speed up while hovered.
follow
Type boolean
true
The light leans toward a nearby pointer.
stroke
Type number
1.5
Stroke width.
radius
Type number
16
Corner radius.
ray
Type number
0.55
Strength of the light rays under the badge.
inner
Type number
0.5
Strength of the inner waves.
rayLength
Type number
11
How far the rays fall.
period
Type number
3.6
Seconds per 360° turn of the stroke gradient.
hoverIntensity
Type number
0.4
How much brighter the light gets while hovered (0.4 = 40%).
hoverSpeed
Type number
0.45
How much faster the waves run while hovered (0.45 = 45%).
followStrength
Type number
0.3
How far the light leans toward the cursor, as a share of the way.
followRange
Type number
220
How near the cursor must be for the light to notice it.
childrenrequired
Type ReactNode
–
Badge content.
colors
Type string[]
–
Stroke gradient stops; see PRESETS in presets.ts.
castOn
Type RefObject<HTMLCanvasElement>
–
Canvas below (see LightCatcher) that catches the light.
className
Type string
–
Classes for the badge.