Spinner (lv_spinner)

A spinning arc over a ring. Used to show that some activity is in progress.

Edit on GitHub

Overview

The Spinner shows a spinning arc over a static ring. It is typically used to indicate that an activity is in progress.

Create a spinner

lv_spinner_create(parent) creates the widget; lv_spinner_set_anim_params(spinner, spin_duration, angle) tunes one revolution's duration (ms) and the moving arc's length (degrees).

Styling

Spinner reuses lv_arc's parts: LV_PART_MAIN (static background ring) and LV_PART_INDICATOR (moving arc segment). Style each with the arc-family properties — arc_color, arc_width, arc_rounded. A faint MAIN with an accent INDICATOR gives the familiar loading look.

Events

By default, Spinner Widgets are created without the LV_OBJ_FLAG_CLICKABLE flag, but you can add it to make the Widget detect and send events LV_EVENT_CLICKED.

Learn more about Events emitted by all Widgets.

Last updated on

On this page