Skip to content

st.segmented control unnecessarily wraps #12857

@kmcgrady

Description

@kmcgrady

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 st.segmented_control component is exhibiting unexpected wrapping behavior in certain scenarios. While reproducing the issue consistently is challenging, it appears that the wrapping occurs when the content's width constraints are too restrictive.

Reproducible Code Example

import streamlit as st

options = ["North", "East", "South", "West"]
selection = st.segmented_control(
    "Directions", options, selection_mode="multi"
)

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: 1.50
  • Python version: 3.11
  • Operating System: macOS
  • Browser: Chrome

Additional Information

No response

Metadata

Metadata

Assignees

Labels

feature:st.segmented_controlRelated to the `st.segmented_control` widgetpriority:P2Medium-high priority - fix within one monthstatus: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