Progress
A visual indicator that shows the completion status of a task or operation.
Loading...
<twig:Progress value="33" />
Installation
bin/console ux:install progress --kit shadcn
That's it!
Install the following Composer dependencies:
composer require tales-from-a-dev/twig-tailwind-extra:^1.0.0
Copy the following file(s) into your Symfony app:
{# @prop value integer The progress value between 0 and 100, default to `0` #}
{%- props value = 0 -%}
<div
class="{{ 'relative h-4 w-full overflow-hidden rounded-full bg-secondary ' ~ attributes.render('class')|tailwind_merge }}"
role="progressbar"
aria-valuemin="0"
aria-valuemax="100"
aria-valuenow="{{ value }}"
{{ attributes }}
>
<div class="h-full w-full flex-1 bg-primary transition-all" style="transform: translateX(-{{ 100 - value }}%)"></div>
</div>
Happy coding!
Usage
<twig:Progress value="33" />
API Reference
Progress
| Prop | Type | Description |
|---|---|---|
value |
integer |
The progress value between 0 and 100, default to 0 |