Triangular Grid
MITTiling grid of equilateral triangles with optional animated row offsets
Cargando shader…
Ajústalo
8
1
0
0
0
0
0.3
Instalación
Terminal
npx shadcn@latest add https://<tu-dominio>/r/shader-triangular-grid.json
Crea components/bastard/ShaderTriangularGrid.tsx e instala shaders. Más opciones
Uso
Demo.tsx
1import ShaderTriangularGrid from '@/components/bastard/ShaderTriangularGrid';23export default function Demo() {4 return (5 <ShaderTriangularGrid6 colorA="#1a1a1a"7 colorB="#ffffff"8 cells={8}9 thickness={1}10 rotation={0}11 softness={0}12 variation={0}13 speed={0}14 speedVariance={0.3}15 colorSpace="linear"16 />17 );18}
Props
| Prop | Tipo | Por defecto | Descripción |
|---|---|---|---|
| colorA | string | "#1a1a1a" | Fill |
| colorB | string | "#ffffff" | Lines |
| cells | number | 8 | Cells |
| thickness | number | 1 | Thickness |
| rotation | number | 0 | Rotation |
| softness | number | 0 | Softness |
| variation | number | 0 | Variation |
| speed | number | 0 | Speed |
| speedVariance | number | 0.3 | Speed Variance |
| 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 Triangular Grid · Shaders.com, adaptado para BSTRD UI.Licencia: MIT. Puedes usarlo, modificarlo y venderlo, conservando el aviso de copyright que va dentro del archivo.