Skip to main content

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

Project description

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

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_txt_copybutton-0.0.3.tar.gz (423.5 kB view details)

Uploaded Source

Built Distribution

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

st_txt_copybutton-0.0.3-py3-none-any.whl (823.2 kB view details)

Uploaded Python 3

File details

Details for the file st_txt_copybutton-0.0.3.tar.gz.

File metadata

  • Download URL: st_txt_copybutton-0.0.3.tar.gz
  • Upload date:
  • Size: 423.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.9

File hashes

Hashes for st_txt_copybutton-0.0.3.tar.gz
Algorithm Hash digest
SHA256 8aea200bebd8bd30ae5ff40f2e9820807919696b6b7de7ac6fd2a1c88a350635
MD5 bf7b4a74e6d81d41c456e19f7bb02389
BLAKE2b-256 4de9f9ce8f26dbf068783f944d9947ee564094ea27621df45e77bc178f350866

See more details on using hashes here.

File details

Details for the file st_txt_copybutton-0.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for st_txt_copybutton-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 2e4b5b43335e11fb998afb82f34cac50fe3e6d5a536ca0985466802b86ace866
MD5 53e001f36faf2a22dd8a1a45d9be7c9d
BLAKE2b-256 c4e958d0cc7226697e346b13c1c4af8c552d23f4d65ecdd43ccd1e7d85af5054

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