# Empty

Use the Empty component to display an empty state.

Section: Components / Feedback
Page: https://ui.heyramzi.com/components/empty
Import path: `@heyramzi/ui/shadcn/empty`

## Import

```ts
import * as Empty from "@heyramzi/ui/shadcn/empty";
import { Button } from "@heyramzi/ui/shadcn/button";
```

## Usage

```svelte
<Empty.Root>
  <Empty.Header>
    <Empty.Title>No projects yet</Empty.Title>
    <Empty.Description>Create your first project to get started.</Empty.Description>
  </Empty.Header>
  <Empty.Content>
    <button type="button">Create project</button>
  </Empty.Content>
</Empty.Root>
```

## Demo

```svelte
<script lang="ts">
	import { ArrowUpRight, FolderOpen } from "phosphor-svelte";
	import * as Empty from "@heyramzi/ui/shadcn/empty";
	import { Button } from "@heyramzi/ui/shadcn/button";
</script>

<Empty.Root>
	<Empty.Header>
		<Empty.Media variant="icon">
			<FolderOpen aria-hidden="true" />
		</Empty.Media>
		<Empty.Title>No Projects Yet</Empty.Title>
		<Empty.Description>
			You haven't created any projects yet. Get started by creating your first project.
		</Empty.Description>
	</Empty.Header>
	<Empty.Content>
		<div class="flex gap-2">
			<Button>Create Project</Button>
			<Button variant="outline">Import Project</Button>
		</div>
	</Empty.Content>
	<Button variant="ghost" class="text-muted-foreground" size="sm" href="#/">
		Learn More <ArrowUpRight class="inline" aria-hidden="true" />
	</Button>
</Empty.Root>
```

## API

### Empty.Root

| Prop | Type | Default | Notes |
| --- | --- | --- | --- |
| `ref` | `HTMLDivElement \| null` | `null` | bindable |
| `class` | `string` |  |  |
| `children` | `Snippet` |  |  |

Every prop of `HTMLAttributes<HTMLDivElement>` from `svelte/elements`.

### Empty.Header

| Prop | Type | Default | Notes |
| --- | --- | --- | --- |
| `ref` | `HTMLDivElement \| null` | `null` | bindable |
| `class` | `string` |  |  |
| `children` | `Snippet` |  |  |

Every prop of `HTMLAttributes<HTMLDivElement>` from `svelte/elements`.

### Empty.Media

| Prop | Type | Default | Notes |
| --- | --- | --- | --- |
| `variant` | `"default"` \| `"icon"` | `"default"` |  |
| `ref` | `HTMLDivElement \| null` | `null` | bindable |
| `class` | `string` |  |  |
| `children` | `Snippet` |  |  |

Every prop of `HTMLAttributes<HTMLDivElement>` from `svelte/elements`.

### Empty.Title

| Prop | Type | Default | Notes |
| --- | --- | --- | --- |
| `ref` | `HTMLDivElement \| null` | `null` | bindable |
| `class` | `string` |  |  |
| `children` | `Snippet` |  |  |

Every prop of `HTMLAttributes<HTMLDivElement>` from `svelte/elements`.

### Empty.Description

| Prop | Type | Default | Notes |
| --- | --- | --- | --- |
| `ref` | `HTMLDivElement \| null` | `null` | bindable |
| `class` | `string` |  |  |
| `children` | `Snippet` |  |  |

Every prop of `HTMLAttributes<HTMLDivElement>` from `svelte/elements`.

### Empty.Content

| Prop | Type | Default | Notes |
| --- | --- | --- | --- |
| `ref` | `HTMLDivElement \| null` | `null` | bindable |
| `class` | `string` |  |  |
| `children` | `Snippet` |  |  |

Every prop of `HTMLAttributes<HTMLDivElement>` from `svelte/elements`.
