Installation
Install the component
Run the following command to install the component and its dependencies:
npx @motion-core/cli add dithered-imageImport the component
Import the component into your Svelte file:
import { DitheredImage } from "$lib/motion-core";import { DitheredImage } from "$lib/motion-core";Usage
Props
DitheredImage
| Prop | Type | Default |
|---|---|---|
src | string | — |
ditherMap | "bayer4x4""bayer8x8""halftone""voidAndCluster" | "bayer4x4" |
pixelSize | number | 1 |
color | string | "#ff6900" |
backgroundColor | string | "#111113" |
threshold | number | 0.0 |
class | string | "" |