Skip to main content

A simple Streamlit component for copying text to the user's clipboard with one click.

Project description

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

pip install st-copy-button

Usage instructions

Note: The clipboard API is only available in secure contexts (HTTPS)

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
)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

st_copy_button-0.0.7.tar.gz (224.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

st_copy_button-0.0.7-py3-none-any.whl (229.5 kB view details)

Uploaded Python 3

File details

Details for the file st_copy_button-0.0.7.tar.gz.

File metadata

  • Download URL: st_copy_button-0.0.7.tar.gz
  • Upload date:
  • Size: 224.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.1 CPython/3.9.21 Linux/5.15.154+

File hashes

Hashes for st_copy_button-0.0.7.tar.gz
Algorithm Hash digest
SHA256 941d078efe3d1e29d6f42bc309e650bc2537d5ea5a8d75f5421549dc988703be
MD5 3c612adc1dee03003a673a7c65bdbf2c
BLAKE2b-256 db619eae86bba00510cc9c169d03a2ef69615ae4c5a1a759ddeb0889100ee9b9

See more details on using hashes here.

File details

Details for the file st_copy_button-0.0.7-py3-none-any.whl.

File metadata

  • Download URL: st_copy_button-0.0.7-py3-none-any.whl
  • Upload date:
  • Size: 229.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.1 CPython/3.9.21 Linux/5.15.154+

File hashes

Hashes for st_copy_button-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 ec8957cce5de5068feb81e88a4553954da1f3a060eaf33161a3004d679969df9
MD5 b720043ec1c83807281362451a1512ee
BLAKE2b-256 3e91d007df881a72f5980f25a84e4ce5d6939e21c093e5e887ee758b8426b536

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page