{"id":14970834,"url":"https://github.com/0phoff/st-btn-select","last_synced_at":"2025-10-26T13:31:26.274Z","repository":{"id":57471302,"uuid":"420391237","full_name":"0phoff/st-btn-select","owner":"0phoff","description":"Streamlit Button Select Component","archived":false,"fork":false,"pushed_at":"2021-10-23T13:06:45.000Z","size":54,"stargazers_count":34,"open_issues_count":2,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-09-28T13:41:08.895Z","etag":null,"topics":["component","select","streamlit"],"latest_commit_sha":null,"homepage":"https://share.streamlit.io/0phoff/st-btn-select/demo/test.py","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/0phoff.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-10-23T11:17:26.000Z","updated_at":"2024-09-05T03:40:56.000Z","dependencies_parsed_at":"2022-09-10T11:40:26.675Z","dependency_job_id":null,"html_url":"https://github.com/0phoff/st-btn-select","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0phoff%2Fst-btn-select","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0phoff%2Fst-btn-select/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0phoff%2Fst-btn-select/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0phoff%2Fst-btn-select/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/0phoff","download_url":"https://codeload.github.com/0phoff/st-btn-select/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219862885,"owners_count":16555951,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["component","select","streamlit"],"created_at":"2024-09-24T13:44:12.883Z","updated_at":"2025-10-26T13:31:25.856Z","avatar_url":"https://github.com/0phoff.png","language":"Python","funding_links":["https://ko-fi.com/D1D31LPHE"],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n\u003cimg\n  alt=\"Logo\"\n  src=\"https://raw.githubusercontent.com/0phoff/st-btn-select/master/public/logo.svg\"\n  width=\"100%\"\n/\u003e\n\n[![Version][version-badge]][version-url]\n[![License][license-badge]][license-url]\n\u003ca href=\"https://ko-fi.com/D1D31LPHE\"\u003e\u003cimg alt=\"Ko-Fi\" src=\"https://www.ko-fi.com/img/githubbutton_sm.svg\" height=\"20\"\u003e\u003c/a\u003e\n\n_Streamlit Button Select Component_\n\n\u003c/div\u003e\n\n---\n\nSometimes you want a user to make a selection, but you only have a few options.  \nUsing an `st.selectbox` component works, but wouldn't it be easier to simply have a few buttons in a row ?  \nWell, this custom component allows just that !\n\n\n# Installation\n```bash\npip install st_btn_select\n```\n\n\n# Getting Started\nCreating a Button Selection is really easy.\n```python\nfrom st_btn_select import st_btn_select\n\nselection = st_btn_select(('option 1', 'option 2', 'option 3'))\n```\n\nYou can also use this component as a small top navigation bar.  \n```python\nfrom st_btn_select import st_btn_select\n\npage = st_btn_select(\n  # The different pages\n  ('home', 'about', 'docs', 'playground'),\n  # Enable navbar\n  nav=True,\n  # You can pass a formatting function. Here we capitalize the options\n  format_func=lambda name: name.capitalize(),\n)\n\n# Display the right things according to the page\nif page == 'home':\n  st.write('HOMEPAGE')\n```\n\n\u003e **NOTE**  \n\u003e There can only be one navbar per page, as they will be displayed on top of each other.\n\u003e \n\u003e The navbar buttons do not set any URL hashes, and thus the different pages are not bookmarkable, nor can you use the browser history.\n\n\n## Documentation\nCheck out this streamlit app for the documentation, as well as a demo.  \n[![Open in Streamlit][share-badge]][share-url] \n\n\n\n[version-badge]: https://img.shields.io/pypi/v/st_btn_select?label=version\n[version-url]: https://github.com/0phoff/st-btn-select/releases\n\n[license-badge]: https://img.shields.io/pypi/l/st_btn_select\n[license-url]: https://github.com/0phoff/st-btn-select/blob/master/LICENSE.md\n\n[share-badge]: https://static.streamlit.io/badges/streamlit_badge_black_white.svg\n[share-url]: https://share.streamlit.io/0phoff/st-btn-select/demo/test.py\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0phoff%2Fst-btn-select","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F0phoff%2Fst-btn-select","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0phoff%2Fst-btn-select/lists"}