Skip to content

Progress

Progress indicators communicate ongoing operations. MorphUI provides linear and circular variants, each supporting both determinate (known progress) and indeterminate (unknown duration) modes. Optional wavy variants add a visual flair for indeterminate states.

Variants

Class Shape Mode
MorphLinearProgress Horizontal bar Determinate + Indeterminate
MorphCircularProgress Arc / spinner Determinate + Indeterminate
MorphWavyLinearProgress Sinusoidal bar Determinate + Indeterminate
MorphWavyCircularProgress Sinusoidal arc Determinate + Indeterminate

Usage

from morphui.uix.progress import MorphLinearProgress, MorphCircularProgress

# Determinate — set value between 0.0 and 1.0
bar = MorphLinearProgress(value=0.6)

# Indeterminate — animates continuously
spinner = MorphCircularProgress(indeterminate=True)

# Update progress
bar.value = 0.9   # animates smoothly to new value

Configuration

bar = MorphLinearProgress(
    value=0.5,
    value_animation_duration=0.3,      # seconds
    value_animation_transition='out_quad',
    indeterminate_duration=1.33,       # seconds per cycle
)

morphui.uix.progress

Progress indicator widgets for MorphUI.

This module provides linear and circular progress indicators with support for both determinate (0–1 value) and indeterminate (continuous animation) modes. Value changes animate smoothly. Optional wavy variants apply a sinusoidal stroke for visual interest.

CLASS DESCRIPTION
MorphLinearProgress

Horizontal bar progress indicator.

MorphCircularProgress

Circular arc progress indicator.

MorphWavyLinearProgress

Linear progress with a travelling sine-wave stroke.

MorphWavyCircularProgress

Circular progress with a radial sine-wave stroke.

MorphLinearProgress(**kwargs)

Bases: _MorphProgressBase

A horizontal linear progress indicator.

Supports both determinate (value-driven) and indeterminate (animated) modes. The ends of the active indicator are always rounded, and a small gap separates the indicator from the track.

In indeterminate mode a bar of fixed width slides continuously from left to right. Clamping the bar to the track bounds creates a natural grow/shrink effect at each edge without requiring clipping.

default_config = _MorphProgressBase.default_config.copy() | dict(size_hint=(1, None), height=(dp(8))) class-attribute instance-attribute

Default configuration for the linear progress indicator. Inherits from :attr:_MorphProgressBase.default_config and adds size_hint=(1, None) to make the widget expand horizontally by default.

on_indeterminate(_instance, value)

Start or stop the indeterminate sliding animation.

Called automatically by Kivy whenever :attr:indeterminate changes. Switching modes also refreshes the canvas so the correct geometry is drawn immediately.

MorphCircularProgress(**kwargs)

Bases: _MorphProgressBase

A circular (arc) progress indicator.

Supports both determinate (value-driven) and indeterminate (animated) modes. The ends of the active arc are always rounded, and a small angular gap separates the indicator from the track.

In indeterminate mode the canvas group rotates at constant speed while the indicator arc span oscillates between 1/6 and 5/6 of the circle over a 4-turn cycle, producing a Material Design comet effect.

Initialise the circular progress widget.

Binds :attr:_anim_rotation so that animation frames update the :class:~kivy.graphics.context_instructions.Rotate instruction angle without touching any Line geometry.

default_config = _MorphProgressBase.default_config.copy() | dict(size_hint=(None, None), size=(dp(48), dp(48))) class-attribute instance-attribute

Default configuration for the circular progress indicator.

Inherits from :attr:_MorphProgressBase.default_config and adds size_hint=(None, None) and size=(dp(48), dp(48)) to set a default fixed size.

on_indeterminate(_instance, value)

Start or stop the indeterminate rotation animation.

Called automatically by Kivy whenever :attr:indeterminate changes. Switching modes also refreshes the canvas so the correct geometry (fixed arc vs value-driven arc) is drawn.

MorphWavyLinearProgress(**kwargs)

Bases: _WavePhaseAnimMixin, MorphLinearProgress

A horizontal linear progress indicator with a sinusoidal wave stroke.

Inherits all behaviour (including indeterminate mode) from :class:MorphLinearProgress. The indicator and track segments are rendered as dense polylines tracing a sine wave instead of a straight line.

Because the wave phase is tied to the absolute x coordinate, the indicator and track together form one continuous wave pattern with only the gap separating them. In indeterminate mode the sliding bar reveals a travelling-wave effect as different x positions scroll into view.

MorphWavyCircularProgress(**kwargs)

Bases: _WavePhaseAnimMixin, MorphCircularProgress

A circular arc progress indicator with a sinusoidal radial wave stroke.

Inherits all behaviour (including indeterminate mode) from :class:MorphCircularProgress. The indicator and track arcs are rendered as dense polylines with a radial sine perturbation instead of using the built-in Line.circle primitive.

Phase is based on arc length measured from 0° so indicator and track share a single continuous global wave pattern around the circle. The entire polyline group is still rotated by the canvas :class:~kivy.graphics.context_instructions.Rotate instruction during indeterminate mode.