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.1.2.tar.gz (229.0 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.1.2-py3-none-any.whl (235.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: st_copy_button-0.1.2.tar.gz
  • Upload date:
  • Size: 229.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.12.12 Linux/5.15.154+

File hashes

Hashes for st_copy_button-0.1.2.tar.gz
Algorithm Hash digest
SHA256 26f2dec10e37c3fa7a79a0f4c9bd1098232bd9a68aa8cd634182147c35f1b309
MD5 a86972ffa074f16646096ac5cda6eff2
BLAKE2b-256 eef9678b68e766427887010e744e99685cc732a760274a61482849d9f809c98a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: st_copy_button-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 235.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.12.12 Linux/5.15.154+

File hashes

Hashes for st_copy_button-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c94d91e6b7e86e901a731ebbf3a9487911e188e7ae6bf8775e717cfa17e1f7bb
MD5 49534d25432acd09a1044a7af8d378df
BLAKE2b-256 c4143485dd1646e6d2f0248f8317e21daa0874c0e2d005c2bf5da0fe28b98be2

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