Skip to main content

streamlit-custom-component

Streamlit component that allows you to create button to paste image from clipboard.

confirmed that it works with chrome,safari,edge. it doesn't work with firefox

Installation instructions

pip install st_txt_copybutton

or

pip install st_txt_copybutton --upgrade

Usage instructions

import streamlit as st
from st_txt_copybutton import txt_copy

st.header("Example of Text Clipboard")
st.write("Enter text in the text area below and click the button to copy it to the clipboard.")

# Text area for text input
text_to_copy = st.text_area("Text to copy", "Enter text here", height=100)

# Copy button
copy_result = txt_copy(label="Copy to clipboard", text_to_copy=text_to_copy, key="text_clipboard")

if copy_result:
    st.success(f"{copy_result}")
else:
    st.info("Click the button to copy the text.")

run

streamlt run examle.py

Release files for st-txt-copybutton 0.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for st-txt-copybutton 0.0.3
File Size Uploaded
st_txt_copybutton-0.0.3.tar.gz 423.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for st-txt-copybutton 0.0.3
File Interpreter ABI Platform
st_txt_copybutton-0.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 1.2 MB

Release files / st_txt_copybutton-0.0.3.tar.gz

Download URL st_txt_copybutton-0.0.3.tar.gz
Size 423.5 kB
Tags Source
SHA-256 checksum
How to use checksums
8aea200bebd8bd30ae5ff40f2e9820807919696b6b7de7ac6fd2a1c88a350635
BLAKE2b-256 checksum
How to use checksums
4de9f9ce8f26dbf068783f944d9947ee564094ea27621df45e77bc178f350866
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.9

Release files / st_txt_copybutton-0.0.3-py3-none-any.whl

Download URL st_txt_copybutton-0.0.3-py3-none-any.whl
Size 823.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2e4b5b43335e11fb998afb82f34cac50fe3e6d5a536ca0985466802b86ace866
BLAKE2b-256 checksum
How to use checksums
c4e958d0cc7226697e346b13c1c4af8c552d23f4d65ecdd43ccd1e7d85af5054
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.9

Release history Release notifications | RSS feed

This release

0.0.3 This release

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page