# Empty State **Category**: react **URL**: https://ui.darkcode.dev/en/docs/react/components/empty-state **Source**: https://raw.githubusercontent.com/DarkCode-Developers/darkcode-ui/refs/heads/main/apps/docs/content/docs/en/react/components/(feedback)/empty-state.mdx > A placeholder for empty views with icon, title, description, and call-to-action to guide users. *** ## Import ```tsx import { EmptyState } from '@darkcode-ui/react'; ``` ### Usage ```tsx import {Button, EmptyState} from "@darkcode-ui/react"; import {Icon} from "@iconify/react"; import React from "react"; export function Default() { return ( No results found We couldn't find anything matching your search. Try adjusting your filters or create a new item to get started. ); } ``` ### Anatomy Import the EmptyState component and access all parts using dot notation. ```tsx import { EmptyState } from '@darkcode-ui/react'; export default () => ( ) ``` ### Minimal ```tsx import {Button, EmptyState} from "@darkcode-ui/react"; import {Icon} from "@iconify/react"; import React from "react"; export function Minimal() { return ( Your inbox is empty New messages will appear here. ); } ``` ### Outline ```tsx import {Button, EmptyState} from "@darkcode-ui/react"; import {Icon} from "@iconify/react"; import React from "react"; export function Outline() { return ( No files uploaded Drag and drop files here, or click the button below to upload your first file. ); } ``` ### Sizes The `size` prop controls padding and spacing. Available sizes are `sm`, `md` (default), and `lg`. ### Full Height ```tsx import {Button, EmptyState} from "@darkcode-ui/react"; import {Icon} from "@iconify/react"; import React from "react"; export function FullHeight() { return (
Nothing here yet This space fills the full height of its container. Start by creating your first project.
); } ``` ### With Avatar ```tsx import {Avatar, Button, EmptyState} from "@darkcode-ui/react"; import React from "react"; export function WithAvatar() { return ( JD No assigned tasks Jane doesn't have any tasks assigned yet. Assign a task to get started. ); } ``` ### With Avatar Group ```tsx import {Avatar, Button, EmptyState} from "@darkcode-ui/react"; import React from "react"; const users = [ { id: 1, image_url: "https://darkcode-ui-assets.darkcode.dev/avatars/placeholder-3.jpg", name: "John", }, { id: 2, image_url: "https://darkcode-ui-assets.darkcode.dev/avatars/placeholder-5.jpg", name: "Kate", }, { id: 3, image_url: "https://darkcode-ui-assets.darkcode.dev/avatars/placeholder-20.jpg", name: "Emily", }, { id: 4, image_url: "https://darkcode-ui-assets.darkcode.dev/avatars/placeholder-23.jpg", name: "Michael", }, ]; export function WithAvatarGroup() { return (
{users.map((user) => ( {user.name.charAt(0)} ))}
Invite your team You haven't added any collaborators yet. Invite teammates to start working together.
); } ``` ### With Background ```tsx import {Button, EmptyState} from "@darkcode-ui/react"; import {Icon} from "@iconify/react"; import React from "react"; export function WithBackground() { return (