← All Components
<mth-progress-bar>
Accessible determinate and indeterminate progress bar driven by adopted CSSStyleSheet --_progress custom property.
When NOT to use: Use a lightweight @methane-ui/css layout class instead of a custom element when static CSS suffices.
Live Interactive Preview
Ready · interact with <mth-progress-bar>, or toggle Theme, Direction (LTR/RTL), or props above.
Multi-Framework Playground & Snippets
<script type="module" src="@methane-ui/ui/progress-bar"></script>
<mth-progress-bar value="0" max="100"></mth-progress-bar>import '@methane-ui/ui/progress-bar';
import '@methane-ui/react';
export function Example() {
return <mth-progress-bar value="0" max="100"></mth-progress-bar>;
}<script setup lang="ts">
import '@methane-ui/ui/progress-bar';
</script>
<template>
<mth-progress-bar value="0" max="100"></mth-progress-bar>
</template>import { Component, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import '@methane-ui/ui/progress-bar';
import { MthProgressBarDirective } from '@methane-ui/angular';
@Component({
standalone: true,
schemas: [CUSTOM_ELEMENTS_SCHEMA],
imports: [MthProgressBarDirective],
template: `<mth-progress-bar value="0" max="100"></mth-progress-bar>`,
})
export class ExampleComponent {}<script lang="ts">
import '@methane-ui/ui/progress-bar';
import MthProgressBar from '@methane-ui/svelte/MthProgressBar.svelte';
</script>
<MthProgressBar value="0" max="100"></MthProgressBar>Properties & Attributes
| Property | Attribute | Type | Default | Description |
|---|---|---|---|---|
value | value | number | 0 | Current numeric progress value clamped between 0 and max. |
max | max | number | 100 | Maximum progress value (defaults to 100). |
indeterminate | indeterminate | boolean | false | Switches to indeterminate mode and omits aria-valuenow. |
label | label | string | "" | Accessible label for the progressbar; defaults to localized "Progress" when empty. |
Accessibility Checklist
| Category | Requirement | Verified By |
|---|---|---|
| aria | All aria-* IDREFs resolve within the same DOM root (ADR-003). | scanSameRootAria |
| focus | Focus ownership matches focusModel="none". | lint-plugin & spec-compiler |
| contrast | Renders legible borders, focus outlines, and selection indicators under forced-colors: active. | Playwright forced-colors matrix |
| states | Exposes ElementInternals CustomStateSet flags: :state(indeterminate). | Conformance suite |
| i18n | Routes 1 UI/ARIA strings through @methane-ui/core i18n catalog. | Locale context test |