Skip to content

st.spinner(show_time=True) timer text is visually misaligned and uses inconsistent font styling vs spinner label/icon #13387

@Panosero

Description

@Panosero

Checklist

  • I have searched the existing issues for similar issues.
  • I added a very descriptive title to this issue.
  • I have provided sufficient information below to help reproduce this issue.

Summary

When using st.spinner(..., show_time=True), the spinner’s elapsed-time counter is not visually aligned with the spinner icon and label text. The counter also appears to use a different font size/line-height, causing an uneven baseline and (in my case) wrapping/misalignment (see screenshot).

please check the documentation example: https://docs.streamlit.io/develop/api-reference/status/st.spinner#stspinner:~:text=the%20parent%20container.-,Example,-import%20streamlit%20as

Reproducible Code Example

Open in Streamlit Cloud

import streamlit as st
import time

with st.spinner("Wait for it...", show_time=True):
    time.sleep(5)
st.success("Done!")
st.button("Rerun")

Steps To Reproduce

  1. Create a new Streamlit app with the code below.
  2. Run streamlit run app.py.
  3. Observe the spinner header while it runs.

Expected Behavior

Spinner icon, label text (“Wait for it…”) and elapsed-time counter should be:

  1. vertically aligned on the same baseline or centered consistently using consistent typography (font family/size/line-height), or intentionally styled in a way that still aligns properly
  2. No awkward vertical offset or forced wrapping due to mismatched line-height/font-size.

Current Behavior

The elapsed-time counter is vertically offset relative to the spinner icon/label.
The counter appears to use a different font size/line-height, producing inconsistent typography.
In some layouts it wraps or stacks in an odd way, increasing the misalignment.

Is this a regression?

  • Yes, this used to work in a previous version.

Debug info

  • Streamlit version: v1.52.1
  • Python version: v3.12.12
  • Browser: Chrome

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:stylingRelated to styling and appearancefeature:st.spinnerRelated to `st.spinner` elementpriority:P2Medium-high priority - fix within one monthstatus:confirmedBug has been confirmed by the Streamlit teamtype:bugSomething isn't working as expectedtype:regressionThis bug is a regression from previous behavior

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions