shadcn.io is not affiliated with official shadcn/ui
Empty State examples · Actions
Empty with Input Action Empty State for React
An empty state with a newsletter signup: an email field and a Subscribe button.
An empty state that collects something. Under a mail icon, the title and a description, EmptyContent holds an email Input and a Subscribe button on one row. Use it for a newsletter signup, a waitlist or an invite field where a list would otherwise be blank.
Preview
Installation
FAQ
What kind of input is in the empty state?
An Input with type="email", placeholder="Enter your email" and aria-label="Email", since there is no visible label. It sits beside a Subscribe Button in a div with flex w-full gap-2, inside EmptyContent.
What do the title and description say?
EmptyTitle is "Subscribe to our newsletter". EmptyDescription says the latest updates and news are delivered to the inbox.
Where is the mail icon?
MailIcon is in EmptyMedia with variant="icon", above the title. The input row does not repeat it.
Why is the row full width?
EmptyContent is a centered column with a max width. w-full on the flex row fills that width. Input is w-full and min-w-0, so the field uses the leftover space beside Subscribe.
Related
- Empty with Single Action Empty StateAn empty projects state with a plus icon
- Empty with Multiple Actions Empty StateAn empty upload state with Upload File
- Input with LabelA text input with a label above it
- Button with Text (Standard)The one filled action
- Standard DialogA share dialog with a read-only link, a
- Empty with Link Action Empty StateAn empty state with a book icon and a