Installation
Install the component
Run the following command to install the component and its dependencies:
Import the component
Import the component into your Svelte file:
Usage
Props
2
0.200s
Canvas
A media revealer that animates blocky pixel grids which progressively sharpen to full resolution.
npx @motion-core/cli add pixelated-imagenpx @motion-core/cli add pixelated-imagepnpm dlx @motion-core/cli add pixelated-imagepnpm dlx @motion-core/cli add pixelated-imagebunx @motion-core/cli add pixelated-imagebunx @motion-core/cli add pixelated-imageyarn dlx @motion-core/cli add pixelated-imageyarn dlx @motion-core/cli add pixelated-imageimport { PixelatedImage } from "$lib/motion-core";import { PixelatedImage } from "$lib/motion-core";<script lang="ts">
import { PixelatedImage } from "motion-core";
import type { ComponentProps } from "svelte";
type Props = Partial<ComponentProps<typeof PixelatedImage>>;
let { initialGridSize = 2, stepDuration = 0.2 }: Props = $props();
</script>
<PixelatedImage
src="/images/photos/sample-image-14.webp"
class="h-full min-h-96 w-full"
{initialGridSize}
{stepDuration}
/>
<script lang="ts">
import { PixelatedImage } from "motion-core";
import type { ComponentProps } from "svelte";
type Props = Partial<ComponentProps<typeof PixelatedImage>>;
let { initialGridSize = 2, stepDuration = 0.2 }: Props = $props();
</script>
<PixelatedImage
src="/images/photos/sample-image-14.webp"
class="h-full min-h-96 w-full"
{initialGridSize}
{stepDuration}
/>
| Prop | Type | Default |
|---|---|---|
src | string | — |
initialGridSize | number | 6.0 |
stepDuration | number | 0.15 |
class | string | "" |