Plastic
MITGlossy 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';23export default function Demo() {4 return (5 <ShaderPlastic6 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
| Prop | Tipo | Por defecto | Descripción |
|---|---|---|---|
| scale | number | 1 | Scale |
| rotation | number | 0 | Rotation |
| colorA | string | "#f5f5f7" | Color A |
| colorB | string | "#d9dade" | Color B |
| gradientAngle | number | 90 | Gradient Angle |
| colorSpace | 'linear' | 'oklch' | 'oklab' | 'hsl' | 'hsv' | 'lch' | "linear" | Color Space |
| thickness | number | 0.5 | Puffiness |
| roughness | number | 0.12 | Roughness |
| reflectivity | number | 1 | Reflectivity |
| crumple | number | 0.25 | Crumple |
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.