Skip to content

Empty

An empty state: a list with no items yet, a search with no results.

The icon and action blocks have no matching prop: fill them with Empty:Icon and Empty:Action, while the title and the subtitle keep coming from the props. See blocks.

Empty:Icon is a 3rem box sized for an SVG: give a webfont icon a matching font-size.

Instead of an icon, lead with a large text in Empty:Header, such as an error code:

Or with an illustration in Empty:Img. bordered draws a border around the empty state:

Children replace the whole content, for rich text in the subtitle:

Prop Type Default Description
title string? null Rendered with Empty:Title
subtitle string? null Rendered with Empty:Subtitle
bordered bool false Border around the empty state (empty-bordered)

Other attributes go to the root <div class="empty">.

Component Renders
Empty:Icon <div class="empty-icon">: put any icon inside (Tabler Icons, SVG, ux-icons)
Empty:Header <div class="empty-header">: a large text, such as an error code
Empty:Img <div class="empty-img">: put an illustration inside
Empty:Title <p class="empty-title">
Empty:Subtitle <p class="empty-subtitle text-secondary">
Empty:Action <div class="empty-action">: buttons or links
Block Default
icon Nothing: put an Empty:Icon, Empty:Header or Empty:Img in it
title Empty:Title with the title prop, when set
subtitle Empty:Subtitle with the subtitle prop, when set
action Nothing: put an Empty:Action in it
content icon, title, subtitle and action: replace it to compose freely