Empty State

Empty state placeholder component.

python 7 params

Preview

🔍

No results found

Try adjusting your search or filters.

Arguments
empty_state(title='No results found', description='Try adjusting your search or filters.', icon='🔍')

Usage

views.py
python
from djust import LiveView
from djust.components import EmptyState


class MyView(LiveView):
    template_name = "my_template.html"

    def mount(self, request, **kwargs):
        self.component = EmptyState(title='No results found', description='Try adjusting your search or filters.', icon='🔍')
my_template.html
django
{{ component }}

Parameters

NameTypeDefault
titlestr''
descriptionstr''
iconstr''
action_labelstr''
action_eventstr — renames the event; identity is `name`''
custom_classstr''
**kwargs— passed to `Component.__init__`: `name=` identifies the instance in the events it sends, `id=` sets `component.id`, and any other keyword is kept as state
Source & styles
FilePathNotes
moduledjust.components.components.empty_stateSubclass it, or pass custom_class, to change how it renders.
cssdjust_components/components.cssDefines 4 of this component's classes at line 532, 533, 534, 535. Override those rules, or the custom properties they read, in a stylesheet loaded after it.
cssdjust_theming/scaffold.cssDefines 3 of this component's classes at line 795, 801, 815. Override those rules, or the custom properties they read, in a stylesheet loaded after it.
cssdjust_theming/catalogue.cssDefines 1 of this component's classes at line 93. Override those rules, or the custom properties they read, in a stylesheet loaded after it.