Docs/Fondos

Warp

Apache-2.0

Shader de Paper Shaders (Warp), con 6 presets.

Cargando shader…

Ajústalo

1
0.45
1
0.25
0.8
10
0.1

Instalación

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

Crea components/bastard/PaperWarp.tsx e instala @paper-design/shaders-react. Más opciones

Uso

Demo.tsx
1import PaperWarp from '@/components/bastard/PaperWarp';
2
3export default function Demo() {
4 return (
5 <PaperWarp
6 speed={1}
7 colors={["#121212","#9470ff","#121212","#8838ff"]}
8 proportion={0.45}
9 softness={1}
10 distortion={0.25}
11 swirl={0.8}
12 swirlIterations={10}
13 shapeScale={0.1}
14 shape="checks"
15 />
16 );
17}

Props

PropTipoPor defectoDescripción
speednumber1Speed
colorsstring[][…]Colors
proportionnumber0.45Proportion
softnessnumber1Softness
distortionnumber0.25Distortion
swirlnumber0.8Swirl
swirlIterationsnumber10Swirl Iterations
shapeScalenumber0.1Shape Scale
shapestring"checks"Shape

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

Créditos

Basado en Warp · Paper Shaders, adaptado para BSTRD UI.Licencia: Apache-2.0. Puedes usarlo, modificarlo y venderlo, conservando el aviso de copyright que va dentro del archivo.