Docs/Efectos

Chalkboard

MIT

Renders 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';
2
3export default function Demo() {
4 return (
5 <ShaderChalkboard
6 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

PropTipoPor defectoDescripción
boardColorstring"#000000"Board
chalkColorstring"#eceadb"Chalk
edgeSensitivitynumber0.5Edge Sensitivity
edgeThicknessnumber1.5Edge Thickness
shadingnumber0.05Shading
hatchScalenumber16Hatch Scale
grainnumber0.45Grain

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.