{"library":"streamlit-feedback","title":"Streamlit Feedback Component","type":"library","description":"Streamlit-feedback is a Streamlit component that allows developers to easily collect structured or free-form user feedback, such as thumbs up/down, emoji faces, or text comments, directly within their Streamlit applications. It is currently at version 0.1.4 and receives updates for compatibility with new Streamlit versions and feature enhancements, maintaining an active development status.","language":"python","status":"active","last_verified":"Thu Apr 16","install":{"commands":["pip install streamlit-feedback"],"cli":null},"imports":["from streamlit_feedback import st_feedback"],"auth":{"required":false,"env_vars":[]},"links":{"homepage":null,"github":null,"docs":null,"changelog":null,"pypi":"https://pypi.org/project/streamlit-feedback/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null},"quickstart":{"code":"import streamlit as st\nfrom streamlit_feedback import st_feedback\n\nst.set_page_config(layout=\"wide\")\n\nst.header(\"User Feedback Example\")\n\n# Basic thumbs up/down feedback\nfeedback_thumbs = st_feedback(\n    feedback_type=\"thumbs\",\n    optional_text_label=\"Tell us more (optional):\"\n)\n\nif feedback_thumbs:\n    st.success(f\"Thumbs Feedback received: {feedback_thumbs}\")\n    # In a real application, you would store this feedback (e.g., to a database).\nelse:\n    st.info(\"Please provide your thumbs feedback.\")\n\nst.markdown(\"--- \")\n\n# Faces feedback with a custom key\nst.subheader(\"Rate your experience\")\nfeedback_faces = st_feedback(\n    feedback_type=\"faces\",\n    feedback_options=[\"😀 Excellent\", \"🙂 Good\", \"😐 Neutral\", \"🙁 Poor\", \"😞 Very Poor\"],\n    key=\"experience_feedback\" # Unique key is crucial for multiple widgets\n)\n\nif feedback_faces:\n    st.success(f\"Faces Feedback received: {feedback_faces}\")\nelse:\n    st.info(\"Please rate your experience.\")\n\nst.caption(\"To run this app, save it as `app.py` and execute: `streamlit run app.py`\")\n","lang":"python","description":"This quickstart demonstrates how to integrate `streamlit-feedback` into a basic Streamlit application. It shows both 'thumbs' and 'faces' feedback types, including how to handle the returned feedback and the essential use of the `key` parameter for multiple components. The app must be run using `streamlit run`.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}