Skip to content

st.color_picker should have 40px minimum width #12872

@sfc-gh-lwilby

Description

@sfc-gh-lwilby

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

The rectangle we show with the color is always 40x40px. Setting the width smaller makes the label smaller (see below), but that doesn’t really make sense if the rectangle anyway has 40px, so I’d simply set the minimum width to 40px on this element.

Screenshot 2025-06-13 at 16.22.16.png

Reproducible Code Example

Steps To Reproduce

No response

Expected Behavior

No response

Current Behavior

No response

Is this a regression?

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

Debug info

  • Streamlit version:
  • Python version:
  • Operating System:
  • Browser:

Additional Information

No response

Metadata

Metadata

Assignees

Labels

feature:st.color_pickerRelated to the `st.color_picker` widgetpriority:P4Low prioritystatus:confirmedBug has been confirmed by the Streamlit teamtype:bugSomething isn't working as expected

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions