Empty
An empty state: media, title, description and actions, centred.
Installation
Shadwire follows shadcn/ui's open code model: the component's source is copied into your application and becomes yours. Install it with the CLI:
The empty registry item installs these files:
-
app/components/ui_component.rb -
app/components/ui/empty_component.rb -
app/components/ui/empty/header_component.rb -
app/components/ui/empty/media_component.rb -
app/components/ui/empty/title_component.rb -
app/components/ui/empty/description_component.rb -
app/components/ui/empty/content_component.rb -
app/helpers/ui/empty_helper.rb -
vendor/shadwire/shadwire.css
Haven't installed the CLI yet? gem install shadwire, then shadwire init.
Usage
Examples
Default
An empty state with an icon, text and one action.
No messages
When you get messages, they show up here.
API reference
Every part accepts class / class_name and **attrs.
| Component | Argument | Default | Description |
|---|---|---|---|
Empty::Media |
variant |
:default |
:icon draws a muted tile around an icon; :default is a bare slot. One of :default, :icon. |