Theme

Start Here

Start from the smallest working snippet, then move to interactive examples and the full API contract below.

Styled quick start

Copy this entrypoint first. It includes the imports required to get the component on screen.

svelte
<script lang="ts">
  import '@dryui/ui/themes/default.css';
  import '@dryui/ui/themes/dark.css';
  import { Image } from '@dryui/ui';
</script>

<Image>Content</Image>

Import options

Root package

ts
import { Image } from '@dryui/ui'

Per-component subpath

ts
import { Image } from '@dryui/ui/image'

Customize

Use the interactive examples to see common variants, states, and composition patterns before building your own.

Default

Random image
svelte
<Image src="https://picsum.photos/300/200" alt="Random image" />

Fallback

Image with fallback
svelte
<Image
  src="https://invalid.test/missing.jpg"
  alt="Image with fallback"
  fallback="https://picsum.photos/300/200?grayscale"
/>

Lazy Loading

Lazy loaded
svelte
<Image src="https://picsum.photos/300/200?random=2" alt="Lazy loaded" loading="lazy" />

Compose

The full API contract lives here: props, CSS variables, and the public data attributes you can target when styling.

Prop Type Default Required Bindable
fallback
string
fallbackSnippet
Snippet

Forwards native HTML attributes via rest props.