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
6
Canvas
An image display component that applies a structure-tensor guided anisotropic Kuwahara watercolor filter.
npx @motion-core/cli add watercolor-imagenpx @motion-core/cli add watercolor-imageimport { WatercolorImage } from "$lib/motion-core";import { WatercolorImage } from "$lib/motion-core";<script lang="ts">
import { WatercolorImage } from "motion-core";
import type { ComponentProps } from "svelte";
type Props = Partial<ComponentProps<typeof WatercolorImage>>;
let { radius = 6, tensorPass = true, kuwaharaPass = true }: Props = $props();
</script>
<WatercolorImage
src="/images/photos/sample-image-16.webp"
class="h-full min-h-96 w-full"
{radius}
{tensorPass}
{kuwaharaPass}
/>
<script lang="ts">
import { WatercolorImage } from "motion-core";
import type { ComponentProps } from "svelte";
type Props = Partial<ComponentProps<typeof WatercolorImage>>;
let { radius = 6, tensorPass = true, kuwaharaPass = true }: Props = $props();
</script>
<WatercolorImage
src="/images/photos/sample-image-16.webp"
class="h-full min-h-96 w-full"
{radius}
{tensorPass}
{kuwaharaPass}
/>
| Prop | Type | Default |
|---|---|---|
src | string | — |
radius | number | 6 |
tensorPass | boolean | true |
kuwaharaPass | boolean | true |
class | string | "" |