Progress Circle
Style-agnostic circular progress indicator using SVG stroke-dasharray.
Preview
Arguments
progress_circle(value=75)
Arguments
progress_circle(value=33, color='warning')
Usage
views.py
python
from djust import LiveView
from djust.components import ProgressCircle
class MyView(LiveView):
template_name = "my_template.html"
def mount(self, request, **kwargs):
self.component = ProgressCircle(value=75)my_template.html
django
{{ component }}Parameters
| Name | Type | Default |
|---|---|---|
| value | int | 0 |
| size | str | 'md' |
| color | str | 'primary' |
| show_value | bool | True |
| custom_class | str | '' |
| **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.progress_circle | Subclass it, or pass custom_class, to change how it renders. |
| css | djust_components/components.css | Defines 7 of this component's classes at line 2447, 2474, 2476, 2481, 2484, 2486. Override those rules, or the custom properties they read, in a stylesheet loaded after it. |
| css | djust_components/components-classes.css | Defines 5 of this component's classes at line 515, 521, 525, 534, 542. Override those rules, or the custom properties they read, in a stylesheet loaded after it. |