Voronoi
MITCellular pattern where each pixel is colored by its distance to the nearest of many scattered points
Cargando shader…
Ajústalo
6
0.5
0
0.5
0.05
Instalación
Terminal
npx shadcn@latest add https://<tu-dominio>/r/shader-voronoi.json
Crea components/bastard/ShaderVoronoi.tsx e instala shaders. Más opciones
Uso
Demo.tsx
1import ShaderVoronoi from '@/components/bastard/ShaderVoronoi';23export default function Demo() {4 return (5 <ShaderVoronoi6 colorA="#3186cf"7 colorB="#fc02dd"8 colorBorder="#000000"9 scale={6}10 speed={0.5}11 seed={0}12 edgeIntensity={0.5}13 edgeSoftness={0.05}14 colorSpace="linear"15 />16 );17}
Props
| Prop | Tipo | Por defecto | Descripción |
|---|---|---|---|
| colorA | string | "#3186cf" | Color A (Center) |
| colorB | string | "#fc02dd" | Color B (Edge) |
| colorBorder | string | "#000000" | Border Color |
| scale | number | 6 | Scale |
| speed | number | 0.5 | Speed |
| seed | number | 0 | Seed |
| edgeIntensity | number | 0.5 | Edge Intensity |
| edgeSoftness | number | 0.05 | Edge Softness |
| colorSpace | 'linear' | 'oklch' | 'oklab' | 'hsl' | 'hsv' | 'lch' | "linear" | Color Space |
Aquí aparecen las props ajustables. El componente acepta más: revisa el código fuente.
Créditos
Basado en Voronoi · Shaders.com, adaptado para BSTRD UI.Licencia: MIT. Puedes usarlo, modificarlo y venderlo, conservando el aviso de copyright que va dentro del archivo.