Skip to main content

A customizable tile component for Streamlit apps

Project description

Streamlit Tile Component

A customizable tile component for Streamlit apps that provides a button-like interface with a modern tile appearance.

Features

  • Customizable appearance: Choose from multiple color themes, icons, and dimensions
  • Material Icons integration: Use any Material Icons icon
  • Responsive design: Built with Tailwind CSS for modern styling
  • Interactive feedback: Hover and click animations
  • Easy integration: Works seamlessly with Streamlit's component system

Usage

Basic Usage

import streamlit as st
from streamlit_tile import streamlit_tile

# Create a simple tile
clicked = streamlit_tile(
    title="My Tile",
    description="This is a sample tile",
    icon="home",
    color_theme="blue"
)

if clicked:
    st.write("Tile was clicked!")

Advanced Usage

import streamlit as st
from streamlit_tile import streamlit_tile

# Create a dashboard with multiple tiles
col1, col2, col3 = st.columns(3)

with col1:
    users_clicked = streamlit_tile(
        title="Users",
        description="Manage application users and permissions",
        icon="people",
        color_theme="blue",
        height=250,
        width=300,
        key="users_tile"
    )

with col2:
    settings_clicked = streamlit_tile(
        title="Settings", 
        description="Configure application preferences",
        icon="settings",
        color_theme="yellow",
        height=250,
        width=300,
        key="settings_tile"
    )

with col3:
    reports_clicked = streamlit_tile(
        title="Reports",
        description="Generate and view various reports", 
        icon="description",
        color_theme="indigo",
        height=250,
        width=300,
        key="reports_tile"
    )

# Handle tile clicks
if users_clicked:
    st.info("Users section accessed!")
if settings_clicked:
    st.info("Settings section accessed!")
if reports_clicked:
    st.info("Reports section accessed!")

Parameters

Parameter Type Default Description
title str "Default Title" The title text displayed on the tile
description str "Default description" The description text displayed on the tile
icon str "home" Material Icons icon name (e.g., 'people', 'settings', 'chat')
color_theme str "blue" Color theme: 'blue', 'red', 'yellow', 'indigo', 'green', 'purple'
height int 200 Height of the tile in pixels
width int 300 Width of the tile in pixels
key str None Unique key for the component (required for multiple tiles)

License

This project is licensed under the MIT License.

Acknowledgments

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

streamlit_tile-2.0.0.tar.gz (402.4 kB view details)

Uploaded Source

Built Distribution

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

streamlit_tile-2.0.0-py3-none-any.whl (405.2 kB view details)

Uploaded Python 3

File details

Details for the file streamlit_tile-2.0.0.tar.gz.

File metadata

  • Download URL: streamlit_tile-2.0.0.tar.gz
  • Upload date:
  • Size: 402.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.1

File hashes

Hashes for streamlit_tile-2.0.0.tar.gz
Algorithm Hash digest
SHA256 9888a0c1d1fa8116ba5a57d7e760471153b44df340aea9787397977bac423f6c
MD5 53218c23da113f3da0c5be5ec2503c63
BLAKE2b-256 bbfce5d487e1d8cf0e85c848f4b82400e4cb72e688f556409210eff5512fa257

See more details on using hashes here.

File details

Details for the file streamlit_tile-2.0.0-py3-none-any.whl.

File metadata

  • Download URL: streamlit_tile-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 405.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.1

File hashes

Hashes for streamlit_tile-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3a4a8b3a523b135fa62b9db01a97a318074598b029c1b713d2370fc00dc35a95
MD5 7534a588eedc7b8aee185688cef6ec02
BLAKE2b-256 a9258666aaa7fdf84e163d470c03d9bd79cf165805851bf5487742978cedbc95

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