ProgressCircular
SVG-based circular progress indicator. Supports determinate, indeterminate and custom size modes.
Aperçu
Rendu de l’aperçu en cours…
indeterminateRendu de l’aperçu en cours…
25%Rendu de l’aperçu en cours…
50%Rendu de l’aperçu en cours…
75%Rendu de l’aperçu en cours…
100%Structure
Anatomie
Décomposition visuelle de la structure interne du composant avec les appels de classes BEM.
<origam-progress-circular> — 4 internal parts: root container ①, background SVG ring ②, foreground SVG arc ③, and content slot for inner label ④.- 1.origam-progress--circular
- Root element.
display: inline-flex; position: relative. Size driven by size prop via useSize →origam-progress--size-{size}modifier. - 2.origam-progress__underlay
- Background SVG circle (
<circle>). Color from bgColor prop. Opacity 0.5 by default. z-index: 1. - 3.origam-progress__overlay
- Foreground SVG arc. stroke-dashoffset driven by normalised value. In indeterminate mode: animated via CSS keyframes. z-index: 2.
- 4.origam-progress__content
- Center content area. Rendered only when the #default slot is filled.
display: flex; align-items: center; justify-content: center.
API
Props
Toutes les props acceptées par ce composant, avec leur type, valeur par défaut et description.
- rotatestring | number0
- Rotation offset applied to the SVG. The start point defaults to the top (−90 deg applied internally).
- indeterminatebooleanfalse
- Activates the continuous spin animation (unknown duration). Overrides modelValue display.
- modelValuestring | number0
- Current progress value between 0 and max. Ignored in indeterminate mode.
- thicknessstring | number4
- Stroke width of the SVG circles. Accepts a number (px) or CSS length.
- activebooleantrue
- When false, the component is hidden (visibility: hidden).
- absolutebooleanfalse
- Positions the component absolutely within its container.
- maxnumber | string100
- Maximum value used to normalise modelValue into a 0-100 percentage.
- stripedbooleanfalse
- Adds a stripe pattern to the progress arc.
- labelstring'Loading'
- Accessible label (aria-label) for the progress indicator. Pass a localised string.
- tagstring'div'
- Root HTML element.
- idstring
- classstring | Array<string> | object
- stylestring | Array<string> | object | StyleValue
- color
- Foreground arc color. Accepts intent tokens (primary, success…) or a CSS color.
- bgColor
- Background ring color. Defaults to --origam-progress-circular__underlay---color (color.surface.disabled at 50% opacity).
- paddingboolean | number | string
- paddingTopboolean | number | string
- paddingLeftboolean | number | string
- paddingBottomboolean | number | string
- paddingRightboolean | number | string
- paddingBlockboolean | number | string
- paddingInlineboolean | number | string
- paddingInlineStartboolean | number | string
- paddingInlineEndboolean | number | string
- paddingBlockStartboolean | number | string
- paddingBlockEndboolean | number | string
- marginboolean | number | string
- marginTopboolean | number | string
- marginLeftboolean | number | string
- marginBottomboolean | number | string
- marginRightboolean | number | string
- marginBlockboolean | number | string
- marginInlineboolean | number | string
- marginInlineStartboolean | number | string
- marginInlineEndboolean | number | string
- marginBlockStartboolean | number | string
- marginBlockEndboolean | number | string
- Controls the component dimensions. Named sizes: x-small (16), small (24), default (32), large (48), x-large (64). A number sets an explicit pixel size.
API
Slots
Emplacements de contenu exposés par ce composant.
- #default
- Content rendered inside the circular progress (e.g. a percentage label). Slot prop value is the normalised 0-100 value.
API
Membres exposés
Propriétés et méthodes accessibles via ref template (defineExpose). Utilisés pour le contrôle programmatique.
- <T extends object>(props: T, exclude?: string[]) => Partial<T>
- Utility to forward a filtered subset of props to child components.
- Ref<string>
- Reactive CSS string generated by useStyle.
- string
- Unique style-sheet ID for this instance.
- () => void
- Injects the computed style sheet into the document.
- () => void
- Removes the injected style sheet.
- Ref<boolean>
- True once the style sheet has been injected.
Personnalisation
Variables CSS
Propriétés CSS personnalisées exposées par ce composant. Surchargez-les pour personnaliser sans perdre la compatibilité avec le thème.
- Color of the background ring. Resolves to neutral.200 (light) / neutral.800 (dark).
- Opacity of the background ring.
- Foreground arc color. Overridden at runtime by the color prop via useTextColor.
- Duration of the stroke-dashoffset transition in determinate mode.
- Easing function for the stroke transition.
Inclusion
Accessibilité
Rôles ARIA, navigation clavier et gestion du focus. Sourcé depuis le template réel du composant.
Rôles ARIA
Notes
- The component applies role="progressbar" via the progress composable. aria-valuenow, aria-valuemin (0) and aria-valuemax are bound automatically.
- Pass the label prop with a localised string to set aria-label. Defaults to "Loading".
- Under prefers-reduced-motion: reduce, the CSS spin and dash animations are disabled.
Fondation
Design tokens
Extrait des tokens de ce composant — les variables --origam-<composant>---<propriété>, déclarées dans sa feuille de tokens tenue à la main, sans étape de build.
- dimension32px
- Default (medium) size: 32 × 32 px.
- colorvar(--origam-color__surface---disabled)
- Background ring color — muted track.
- numbervar(--origam-opacity---50)
- Background ring opacity.
- colorvar(--origam-color__action--primary---bg)
- Default foreground arc color (overridden by color prop at runtime).
- durationvar(--origam-motion__duration---medium)
- Arc transition duration in determinate mode.
- duration1400ms
- Duration of the indeterminate spin/dash SVG animations.
Interactif
Playground
Modifiez les props en direct et observez le composant se mettre à jour. Le snippet de code généré suit vos changements.
Rendu de l’aperçu en cours…
Usage
Exemples
Extraits de code prêts à coller dans vos templates.
Determinate
Indeterminate
Sizes
Écosystème
Famille
Composants du même dossier qui partagent les conventions et se composent souvent ensemble.