Skip to content

Components and Frameworks to give new features to streamlit

License

Notifications You must be signed in to change notification settings

quiradev/streamlit-plugins

Repository files navigation

Streamlit Plugins

Components and frameworks to extend Streamlit's capabilities with advanced features and customizations.

Demo Multipage with Navbar


Table of Contents

  1. Introduction
  2. Features
  3. Usage
  4. Roadmap
  5. Contributing
  6. License

Introduction

Welcome to Streamlit Plugins, a collection of tools designed to enhance your Streamlit apps with features like:

  • A customizable Navbar with multiple positioning options (including lateral mode!).
  • A Loader for better user feedback.
  • Advanced integrations like LabelStudio and SnakeViz.

Features

Frameworks

Multilit (Inherits from Hydralit)

This is a fork of Hydralit with updated compatibility for the latest Streamlit version.

  • Improved interface and user experience.
  • Respects Streamlit's active theme, with support for user overrides.
  • Future plans to integrate native Streamlit multipage functionality.

Key Features:

  • Built-in buttons or programmatic page navigation.

Change Page with button


Components

Navbar (Sidebar, Topbar, and Under Streamlit Header)

More info

Navbar Component

A versatile navbar component with support for:

  • Native Streamlit multipage apps.
  • Multilit framework.
  • Multiple positions: top, under, and side.

Responsive and Customizable:

  • Adjust themes and configurations dynamically.

Example: Multipage App with Native Streamlit Navbar

st.set_page_config(layout="wide")
# Example Sidebar
with st.sidebar:
    st.radio("Navbar Position", ["top", "under", "side"])
    st.checkbox("Sticky Navbar")
# Example Navbar Integration
from streamlit_plugins.components.navbar import st_navbar
st_navbar(
    menu_definition=[{"name": "Home", "icon": "🏠", "page": "home.py"}],
    position_mode="top"
)

Loader (Inherit from Hydralit Components)

Enhance user experience with loaders for transitions and long-running tasks.

AnnotatedText (Inspired by SpaCy Annotated Text)

More info

Display annotated text inline with your app for NLP tasks.

LabelStudio (In Development)

More info

Adapter for integrating LabelStudio into Streamlit for NER and annotation tasks.

SnakeViz

Visualize and analyze bottlenecks in your Python code directly within Streamlit.


Usage

Quickstart

  1. Install the package:
    pip install streamlit-plugins
  2. Import and use components in your Streamlit app.

Example Code

See the examples folder for detailed implementations and usage scenarios.


Roadmap

Framework: Multilit

  • Use native streamlit multipage system

Compontent: Navbar

  • Add Navbar with lateral mode.
  • Support for dynamic theme changes.
  • Add more CSS customization options.
  • Improve documentation and examples.

Compontent: LabelStudio

  • Expand LabelStudio integration.

Contributing

We welcome contributions! Please refer to the CONTRIBUTING.md for guidelines on how to get started.


License

This project is licensed under the MIT License. See the LICENSE file for details.


If you find this project useful, please consider giving it a star!