# st-copy-button
A simple Streamlit component for copying text to the user's clipboard with one click.
Contains portions derived from mmz-001's st-copy-to-clipboard component.
## Installation instructions
```sh
pip install st-copy-button
```
## Usage instructions
> Note: The clipboard API is only available in secure contexts (HTTPS)
```python
import streamlit as st
from st_copy_button import st_copy_button
# Basic usage
st_copy_button("Copy this to clipboard")
# With custom labels
st_copy_button(
text="Custom text",
before_copy_label="📋 Push to copy",
after_copy_label="✅ Text copied!",
show_text=True
)
```
Raw data
{
"_id": null,
"home_page": "https://gitlab.com/james.young2/st-copy-button",
"name": "st-copy-button",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.9.8",
"maintainer_email": null,
"keywords": "streamlit, component, clipboard",
"author": "James Young",
"author_email": "james.young@ramseysolutions.com",
"download_url": "https://files.pythonhosted.org/packages/ea/94/375f0d828dbc4641538f55905bfc46cc410c1f9b74db69864f8ec6885803/st_copy_button-0.1.1.tar.gz",
"platform": null,
"description": "# st-copy-button\n\nA simple Streamlit component for copying text to the user's clipboard with one click.\n\nContains portions derived from mmz-001's st-copy-to-clipboard component.\n\n## Installation instructions\n\n```sh\npip install st-copy-button\n```\n\n## Usage instructions\n\n> Note: The clipboard API is only available in secure contexts (HTTPS)\n\n```python\nimport streamlit as st\nfrom st_copy_button import st_copy_button\n\n# Basic usage\nst_copy_button(\"Copy this to clipboard\")\n\n# With custom labels\nst_copy_button(\n text=\"Custom text\",\n before_copy_label=\"\ud83d\udccb Push to copy\",\n after_copy_label=\"\u2705 Text copied!\",\n show_text=True\n)\n```\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A simple Streamlit component for copying text to the user's clipboard with one click.",
"version": "0.1.1",
"project_urls": {
"Homepage": "https://gitlab.com/james.young2/st-copy-button",
"Repository": "https://gitlab.com/james.young2/st-copy-button"
},
"split_keywords": [
"streamlit",
" component",
" clipboard"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "ce5a2f546dbae0d6ffd77a3264122cabf08cef99470427306f74705992f20cca",
"md5": "d426c79c3f29475747e3c7b5faef9469",
"sha256": "78606136b58703004d49888d26c1d9cdb9397f26cf15fc676222c601755403c8"
},
"downloads": -1,
"filename": "st_copy_button-0.1.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "d426c79c3f29475747e3c7b5faef9469",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.9.8",
"size": 235116,
"upload_time": "2025-09-08T19:36:50",
"upload_time_iso_8601": "2025-09-08T19:36:50.618530Z",
"url": "https://files.pythonhosted.org/packages/ce/5a/2f546dbae0d6ffd77a3264122cabf08cef99470427306f74705992f20cca/st_copy_button-0.1.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "ea94375f0d828dbc4641538f55905bfc46cc410c1f9b74db69864f8ec6885803",
"md5": "0113b137ed8e0ce35478c5b326b6f05e",
"sha256": "d622eb1b7f0947e84ebead27885d5d82951da24c1a3d6128b1f913845274b72b"
},
"downloads": -1,
"filename": "st_copy_button-0.1.1.tar.gz",
"has_sig": false,
"md5_digest": "0113b137ed8e0ce35478c5b326b6f05e",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.9.8",
"size": 228471,
"upload_time": "2025-09-08T19:36:52",
"upload_time_iso_8601": "2025-09-08T19:36:52.118729Z",
"url": "https://files.pythonhosted.org/packages/ea/94/375f0d828dbc4641538f55905bfc46cc410c1f9b74db69864f8ec6885803/st_copy_button-0.1.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-09-08 19:36:52",
"github": false,
"gitlab": true,
"bitbucket": false,
"codeberg": false,
"gitlab_user": "james.young2",
"gitlab_project": "st-copy-button",
"lcname": "st-copy-button"
}