SutraUI.Progress (Sutra UI v0.3.0)
View SourceDisplays an indicator showing the completion progress of a task.
The progress bar displays a visual indicator of task completion. The value should be between 0 and 100.
Examples
<.progress value={33} />
<.progress value={66} size="lg" />
<.progress value={@upload_progress} aria_label="Upload progress" />Accessibility
- Uses
role="progressbar"for screen readers - Includes
aria-valuemin,aria-valuemax, andaria-valuenow - Optional
aria_labelfor additional context
Summary
Functions
Renders a progress bar component.
Functions
Renders a progress bar component.
Attributes
value(:integer) - Progress value from 0 to 100. Defaults to0.size(:string) - The size of the progress bar. Defaults to"default". Must be one of"default","sm","lg", or"xl".class(:string) - Additional CSS classes. Defaults tonil.aria_label(:string) - Accessible label for screen readers. Defaults tonil.- Global attributes are accepted. Additional HTML attributes. Supports all globals plus:
["id"].