Status Dot

Style-agnostic animated status indicator dot using CSS custom properties.

python 9 params

Preview

Arguments
status_dot(status='running', variant='success', size='md')

Usage

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


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

    def mount(self, request, **kwargs):
        self.component = StatusDot(status='running', variant='success', size='md')
my_template.html
django
{{ component }}

Parameters

NameTypeDefault
statusstr
variantstr | NoneNone
sizestr'md'
animatestr | NoneNOT_SUPPLIED
tooltipstr | NoneNone
custom_classstr''
custom_status_mapDict[str, str] | NoneNone
custom_animation_mapDict[str, Optional[str]] | NoneNone
**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.status_dotSubclass it, or pass custom_class, to change how it renders.
cssdjust_components/components-classes.cssDefines 3 of this component's classes at line 68, 88, 109. Override those rules, or the custom properties they read, in a stylesheet loaded after it.