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

<EmptyState.Root>
  <EmptyState.Icon>...</EmptyState.Icon>
  <EmptyState.Title>...</EmptyState.Title>
  <EmptyState.Description>...</EmptyState.Description>
  <EmptyState.Action>...</EmptyState.Action>
</EmptyState.Root>

Import options

Root package

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

Per-component subpath

ts
import { EmptyState } from '@dryui/ui/empty-state'

Customize

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

With Icon, Title, Description, and Action

No messages yet

When you receive messages they will appear here.

svelte
<EmptyState.Root>
  <EmptyState.Icon>📭</EmptyState.Icon>
  <EmptyState.Title>No messages yet</EmptyState.Title>
  <EmptyState.Description>
    When you receive messages they will appear here.
  </EmptyState.Description>
  <EmptyState.Action>
    <Button variant="solid">Compose Message</Button>
  </EmptyState.Action>
</EmptyState.Root>

Search Empty State

No results found

Try adjusting your search or filter to find what you're looking for.

svelte
<EmptyState.Root>
  <EmptyState.Icon>🔍</EmptyState.Icon>
  <EmptyState.Title>No results found</EmptyState.Title>
  <EmptyState.Description>
    Try adjusting your search or filter to find what you're looking for.
  </EmptyState.Description>
</EmptyState.Root>

Structure

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

EmptyState.Root
  EmptyState.Icon
  EmptyState.Title
  EmptyState.Description
  EmptyState.Action
EmptyState.Root EmptyState.IconEmptyState.TitleEmptyState.DescriptionEmptyState.Action

Compose

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

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

EmptyState.IconEmptyState.TitleEmptyState.DescriptionEmptyState.Action

EmptyState.Root

Prop Type Default Required Bindable
children
Snippet

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

EmptyState.Icon

Prop Type Default Required Bindable
children
Snippet

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

EmptyState.Title

Prop Type Default Required Bindable
children
Snippet

Forwards <h*> attributes via rest props. Common examples: id, style, aria-label.

EmptyState.Description

Prop Type Default Required Bindable
children
Snippet

Forwards <p> attributes via rest props. Common examples: id, style, aria-describedby.

EmptyState.Action

Prop Type Default Required Bindable
children
Snippet

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