Skip to main content

streamlit components of antd design

Project description

Streamlit-Antd-Components

A Streamlit component to display Antd-Design.

Check out the Demo for more example. demo

highlight

  • support streamlit theme(light or dark mode,or custom theme)
  • support Bootstrap Icon
  • more style params
  • multiple nested items in menu and tree

Install

pip install streamlit-antd-components

Usage

This library now provides 4 component:

  • buttons A group of buttons component.
  • tabs A tabs component.
  • menu A versatile menu for navigation
  • tree A hierarchical list structure component.

buttons example

import streamlit as st
from streamlit_antd_components import buttons

btn = buttons(['button1', 'button2', 'button3'], align='center', shape='round', format_func=lambda x: x.title())
st.write(f'The selected button label is: {btn}')

buttons

tabs example

import streamlit as st
from streamlit_antd_components import tabs

tab = tabs(['tab1', 'tab2', 'tab3'], align='center', format_func=lambda x: x.title())
st.write(f'The selected tab label is: {tab}')

buttons

menu example

import streamlit as st
from streamlit_antd_components import menu, MenuItem

item = menu([
    MenuItem('menu1', icon='house'),
    MenuItem('menu2', icon='app', children=[
        MenuItem('menu3', icon='twitter'),
        MenuItem('disabled', disabled=True),
    ]),
], format_func=lambda x: x.title(), open_all=True)
st.write(f'The selected menu label is: {item}')

buttons

tree example

import streamlit as st
from streamlit_antd_components import tree, TreeItem

item = tree([
    TreeItem('tree1', icon='table'),
    TreeItem('tree2', icon='table', children=[
        TreeItem('tree3', icon='image'),
        TreeItem('disabled', disabled=True),
    ]),
], index=[0], format_func=lambda x: x.title(), open_all=True, checkbox=True, show_line=True)
st.write(f'The selected tree label is: {item}')

buttons

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

File details

Details for the file streamlit_antd_components-0.1.4-py3-none-any.whl.

File metadata

File hashes

Hashes for streamlit_antd_components-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 5f8a8bec930f43240fef4392f45f583a48ecb64444bc91826d83ec5c1ae739de
MD5 ae392ef14f9c9a0bf8d9cb7a0c625034
BLAKE2b-256 d63e3997675b15f1057c63cbb2b65eba01ab658a76fcabdfff85830a168cd810

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page