Docs/Formas

Plastic

MIT

Glossy molded plastic with photorealistic studio reflections, driven in a custom shape

Cargando shader…

Ajústalo

1
0
90
0.5
0.12
1
0.25

Instalación

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

Crea components/bastard/ShaderPlastic.tsx e instala shaders. Más opciones

Uso

Demo.tsx
1import ShaderPlastic from '@/components/bastard/ShaderPlastic';
2
3export default function Demo() {
4 return (
5 <ShaderPlastic
6 scale={1}
7 rotation={0}
8 colorA="#f5f5f7"
9 colorB="#d9dade"
10 gradientAngle={90}
11 colorSpace="linear"
12 thickness={0.5}
13 roughness={0.12}
14 reflectivity={1}
15 crumple={0.25}
16 />
17 );
18}

Props

PropTipoPor defectoDescripción
scalenumber1Scale
rotationnumber0Rotation
colorAstring"#f5f5f7"Color A
colorBstring"#d9dade"Color B
gradientAnglenumber90Gradient Angle
colorSpace'linear' | 'oklch' | 'oklab' | 'hsl' | 'hsv' | 'lch'"linear"Color Space
thicknessnumber0.5Puffiness
roughnessnumber0.12Roughness
reflectivitynumber1Reflectivity
crumplenumber0.25Crumple

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

Créditos

Basado en Plastic · Shaders.com, adaptado para BSTRD UI.Licencia: MIT. Puedes usarlo, modificarlo y venderlo, conservando el aviso de copyright que va dentro del archivo.