Docs/Formas

Light Edge

MIT

Glowing, pulsing light racing around the edge of any 2D, SVG, or 3D shape. Powered by Paper Shaders.

Cargando shader…

Ajústalo

1
0
0.25
0.5
0.6
0.3
3

Instalación

Terminal
npx shadcn@latest add https://<tu-dominio>/r/shader-light-edge.json

Crea components/bastard/ShaderLightEdge.tsx e instala shaders. Más opciones

Uso

Demo.tsx
1import ShaderLightEdge from '@/components/bastard/ShaderLightEdge';
2
3export default function Demo() {
4 return (
5 <ShaderLightEdge
6 scale={1}
7 rotation={0}
8 colorA="#7b2ff7"
9 colorB="#00e0ff"
10 colorSpace="linear"
11 thickness={0.25}
12 softness={0.5}
13 intensity={0.6}
14 bloom={0.3}
15 spots={3}
16 />
17 );
18}

Props

PropTipoPor defectoDescripción
scalenumber1Scale
rotationnumber0Rotation
colorAstring"#7b2ff7"Color A
colorBstring"#00e0ff"Color B
colorSpace'linear' | 'oklch' | 'oklab' | 'hsl' | 'hsv' | 'lch'"linear"Color Space
thicknessnumber0.25Thickness
softnessnumber0.5Softness
intensitynumber0.6Intensity
bloomnumber0.3Bloom
spotsnumber3Spots

Aquí aparecen las props ajustables. El componente acepta más: revisa el código fuente.

Créditos

Basado en Light Edge · Shaders.com, adaptado para BSTRD UI.Licencia: MIT. Puedes usarlo, modificarlo y venderlo, conservando el aviso de copyright que va dentro del archivo.