Docs/Fondos

Prism

MIT

A beam of light that fans out and splits into a slowly-rotating rainbow past a controllable point. Transparent background — composite over a dark layer.

Cargando shader…

Ajústalo

0.04
1.6
0.15
0.6
0.7
0.12
0.95
0.1

Instalación

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

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

Uso

Demo.tsx
1import ShaderPrism from '@/components/bastard/ShaderPrism';
2
3export default function Demo() {
4 return (
5 <ShaderPrism
6 beamWidth={0.04}
7 intensity={1.6}
8 beamColor="#ffffff"
9 startFalloff={0.15}
10 endFalloff={0.6}
11 spread={0.7}
12 softness={0.12}
13 saturation={0.95}
14 speed={0.1}
15 />
16 );
17}

Props

PropTipoPor defectoDescripción
beamWidthnumber0.04Beam Width
intensitynumber1.6Intensity
beamColorstring"#ffffff"Beam Color
startFalloffnumber0.15Start Falloff
endFalloffnumber0.6End Falloff
spreadnumber0.7Spread
softnessnumber0.12Softness
saturationnumber0.95Saturation
speednumber0.1Hue Speed

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

Créditos

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