Status Dot
Style-agnostic animated status indicator dot using CSS custom properties.
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
| Name | Type | Default |
|---|---|---|
| status | str | — |
| variant | str | None | None |
| size | str | 'md' |
| animate | str | None | NOT_SUPPLIED |
| tooltip | str | None | None |
| custom_class | str | '' |
| custom_status_map | Dict[str, str] | None | None |
| custom_animation_map | Dict[str, Optional[str]] | None | None |
| **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
| File | Path | Notes |
|---|---|---|
| module | djust.components.components.status_dot | Subclass it, or pass custom_class, to change how it renders. |
| css | djust_components/components-classes.css | Defines 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. |