You are here

progress-bar.html.twig in Drupal 8

Theme override for a progress bar.

Note that the core Batch API uses this only for non-JavaScript batch jobs.

Available variables:

  • label: The label of the working task.
  • percent: The percentage of the progress.
  • message: A string containing information to be displayed.

File

core/themes/classy/templates/misc/progress-bar.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Theme override for a progress bar.
  5. *
  6. * Note that the core Batch API uses this only for non-JavaScript batch jobs.
  7. *
  8. * Available variables:
  9. * - label: The label of the working task.
  10. * - percent: The percentage of the progress.
  11. * - message: A string containing information to be displayed.
  12. */
  13. #}
  14. {{ attach_library('classy/progress') }}
  15. <div class="progress" data-drupal-progress>
  16. {% if label %}
  17. <div class="progress__label">{{ label }}</div>
  18. {% endif %}
  19. <div class="progress__track"><div class="progress__bar" style="width: {{ percent }}%"></div></div>
  20. <div class="progress__percentage">{{ percent }}%</div>
  21. <div class="progress__description">{{ message }}</div>
  22. </div>