Chalkboard
MITRenders content as a chalk drawing on a blackboard, with edge strokes and cross-hatch shading
Cargando shader…
Ajústalo
0.5
1.5
0.05
16
0.45
Instalación
Terminal
npx shadcn@latest add https://<tu-dominio>/r/shader-chalkboard.json
Crea components/bastard/ShaderChalkboard.tsx e instala shaders. Más opciones
Uso
Demo.tsx
1import ShaderChalkboard from '@/components/bastard/ShaderChalkboard';23export default function Demo() {4 return (5 <ShaderChalkboard6 boardColor="#000000"7 chalkColor="#eceadb"8 edgeSensitivity={0.5}9 edgeThickness={1.5}10 shading={0.05}11 hatchScale={16}12 grain={0.45}13 />14 );15}
Props
| Prop | Tipo | Por defecto | Descripción |
|---|---|---|---|
| boardColor | string | "#000000" | Board |
| chalkColor | string | "#eceadb" | Chalk |
| edgeSensitivity | number | 0.5 | Edge Sensitivity |
| edgeThickness | number | 1.5 | Edge Thickness |
| shading | number | 0.05 | Shading |
| hatchScale | number | 16 | Hatch Scale |
| grain | number | 0.45 | Grain |
Aquí aparecen las props ajustables. El componente acepta más: revisa el código fuente.
Créditos
Basado en Chalkboard · Shaders.com, adaptado para BSTRD UI.Licencia: MIT. Puedes usarlo, modificarlo y venderlo, conservando el aviso de copyright que va dentro del archivo.