kvdomingo/dotrepo/choosing-streamlit-selection-widgets
Claude Code and agent skill by kvdomingo/dotrepo
- community
Checking that the SKILL.md file is still in the repository.
Choosing the right Streamlit selection widget. Use when deciding between radio buttons, selectbox, segmented control, pills, or other option selection widgets. Helps pick the right widget for the number of options and selection type.
Install
npx vskill@latest install kvdomingo/dotrepo/choosing-streamlit-selection-widgetsSKILL.md
The same SKILL.md was published earlier as legout/pi-config/choosing-streamlit-selection-widgets.
Streamlit selection widgets
The right selection widget for the job. Streamlit has evolved—many old patterns are now anti-patterns.
When to use what
Use st.segmented_control or st.pills when you want all options visible at once. Use st.selectbox or st.multiselect when options should be hidden in a dropdown.
| Widget | Best For | |
|---|---|---|
st.segmented_control | 2-5 options, single select, all visible | |
st.pills | 2-5 options, multi-select, all visible | |
st.selectbox | Many options, single select, dropdown | |
st.multiselect | Many options, multi-select, dropdown |
Segmented control (options visible, single select)
For vertical layouts, st.radio(..., horizontal=False) is still a great choice.
Cleaner, more modern look than horizontal radio buttons.
Pills (options visible, multi-select)
Can also be used to mimic an "example" widget, especially with label_visibility="collapsed":
More visual and easier to use than st.multiselect for small option sets.
Selectbox (many options, single select)
Dropdowns scale better than radio/pills for long lists.
Multiselect (many options, multi-select)
Toggle vs checkbox
Use st.toggle for settings that trigger changes in the app. Reserve st.checkbox for forms.
Forms with border=False
Remove the default form border for cleaner inline forms. Keep the border for longer forms where visual grouping helps.
Custom options in selectbox and multiselect
Allow users to add their own options with accept_new_options:
References
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingclaude/skills/developing-with-streamlit/skills/choosing-streamlit-selection-widgets/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/kvdomingo/dotrepo/choosing-streamlit-selection-widgets)