Cloff Labs

Pixelated Shader

Pixelated Shader with threejs

Installation

Run the following command

npx shadcn@latest add https://ui.cloffstudio.com/r/pixelated-shader.json

Props

PropsTypeDefaultDescription
srcstringundefinedURL or path to the image to display (required).
altstring""Accessible alt text for the image.
classNamestring""Additional CSS classes applied to the container.
speednumber1.5Responsiveness multiplier — higher = snappier movement.
intensitynumber1.2Strength of distortion/chromatic aberration.
decaynumber0.08Per-frame decay applied to the aberration (larger = quicker fade).
widthstring | number"100%"Container width (CSS value, e.g. '500px' or 100).
heightstring | number"auto"Container height (CSS). If 'auto', a minHeight of 200px is applied.
objectFit'cover' | 'contain''cover'How the image fits the container: 'cover' fills, 'contain' shows whole image.