A Streamlit component for displaying an Untitled UI styled carousel
Project description
Streamlit Carousel UUI
A Streamlit component that implements the beautiful Untitled UI carousel design. This component provides a sleek, modern carousel with navigation buttons and indicator dots, perfect for showcasing images in your Streamlit applications.
Features
- 🎨 Beautiful Untitled UI design
- 🖼️ Smooth image transitions
- 🎯 Navigation arrows and indicator dots
- 📱 Responsive design
- ⚡ Built with Embla Carousel and React
- 🎭 Two size variants (md and lg)
- 🔧 Easy to use and customize
Installation
You can install the package using pip:
pip install streamlit-carousel-uui
Or install from source:
git clone https://github.com/janduplessis883/streamlit_carousel_uui.git
cd streamlit_carousel_uui
pip install -e .
Usage
import streamlit as st
from streamlit_carousel_uui import uui_carousel
st.title("Untitled UI Carousel Demo")
# Define your carousel items
slides = [
{
"image": "https://images.unsplash.com/photo-1506744038136-46273834b3fb",
"title": "Mountain View",
"description": "Explore the majestic peaks and valleys."
},
{
"image": "https://images.unsplash.com/photo-1470770841072-f978cf4d019e",
"title": "Lake Side",
"description": "Serene waters reflecting the sky."
},
{
"image": "https://images.unsplash.com/photo-1441974231531-c6227db76b6e",
"title": "Forest Path",
"description": "A journey through nature's canopy."
},
]
# Display the carousel
uui_carousel(items=slides, variant="md")
API Reference
uui_carousel(items, variant="md", key=None)
Display an Untitled UI styled carousel component.
Parameters
-
items (list of dict): List of carousel items. Each item should contain:
image(str, required): URL or path to the imagetitle(str, optional): Title text displayed on the slidedescription(str, optional): Description text displayed on the slide
-
variant (str, optional): Size variant of the carousel
"md"(default): Medium size buttons and indicators"lg": Large size buttons and indicators
-
key (str or None, optional): An optional key that uniquely identifies this component
Development
Prerequisites
- Python >= 3.7
- Node.js >= 14
- npm or yarn
Setup Development Environment
- Clone the repository:
git clone https://github.com/janduplessis883/streamlit_carousel_uui.git
cd streamlit_carousel_uui
- Install Python dependencies:
pip install -e .
- Install frontend dependencies:
cd frontend
npm install
- Start the development server:
npm start
- In another terminal, run your Streamlit app:
streamlit run example.py
Building for Production
- Build the frontend:
cd frontend
npm run build
- Build the Python package:
python setup.py sdist bdist_wheel
- Upload to PyPI:
twine upload dist/*
Credits
This component is based on the carousel design from Untitled UI, implemented as a Streamlit component.
License
MIT License
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Support
If you encounter any issues or have questions, please open an issue on GitHub.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file streamlit_carousel_uui-0.1.2.tar.gz.
File metadata
- Download URL: streamlit_carousel_uui-0.1.2.tar.gz
- Upload date:
- Size: 451.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e7ebc0430f101fa709d99d1e7e47cec3f6f4faaadf79c25a26ff05c29c39adf8
|
|
| MD5 |
eee3f0f842e933e3c6b0567c6fc171b1
|
|
| BLAKE2b-256 |
20a96bd7eb940a206f8e1025cecf6110ab9d57ec6a96eb2a34a27a529f7bba75
|
File details
Details for the file streamlit_carousel_uui-0.1.2-py3-none-any.whl.
File metadata
- Download URL: streamlit_carousel_uui-0.1.2-py3-none-any.whl
- Upload date:
- Size: 455.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
66fb7d482691f8dafb5d69d7c0a94e504bf0aca5a22e8af85a5a2b34a1426921
|
|
| MD5 |
b79a4ad1a881ef2e77436fe671deaefd
|
|
| BLAKE2b-256 |
5d08a08754bd38fab7918b1a2e80fa2f96993ab88a39aeeeee1e7f1fc5581b1b
|