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 { LinkPreview } from '@dryui/ui';
</script>

<LinkPreview.Root>
  <LinkPreview.Trigger>...</LinkPreview.Trigger>
  <LinkPreview.Content>...</LinkPreview.Content>
</LinkPreview.Root>

Import options

Root package

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

Per-component subpath

ts
import { LinkPreview } from '@dryui/ui/link-preview'

Customize

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

Default

Svelte Documentation
svelte
<LinkPreview.Root>
  <LinkPreview.Trigger href="https://svelte.dev">
    Svelte Documentation
  </LinkPreview.Trigger>
  <LinkPreview.Content>
    <p><strong>svelte.dev</strong></p>
    <p>The official Svelte documentation with tutorials, examples, and API reference.</p>
  </LinkPreview.Content>
</LinkPreview.Root>

Structure

Compound components always start with LinkPreview.Root. Use this structure block to understand required wrappers before you wire state or styling.

LinkPreview.Root
  LinkPreview.Trigger
  LinkPreview.Content
LinkPreview.Root LinkPreview.TriggerLinkPreview.Content

Compose

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

Compound component. Start with LinkPreview.Root, then add only the parts you need.

LinkPreview.TriggerLinkPreview.Content

LinkPreview.Root

Prop Type Default Required Bindable
open
boolean
false
openDelay
number
700
closeDelay
number
300
children
Snippet

Also accepts standard HTML attributes (class, style, id, etc.)

LinkPreview.Trigger

Prop Type Default Required Bindable
children
Snippet

Forwards <a> attributes via rest props. Common examples: href, target, rel.

LinkPreview.Content

Prop Type Default Required Bindable
offset
number
children
Snippet

Forwards <div> attributes via rest props. Common examples: id, style, role.