-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5d67bab
commit de7f945
Showing
5 changed files
with
115 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
import streamlit as st | ||
import streamfy as sy | ||
|
||
st.subheader("Breadcrumb") | ||
item = sy.breadcrumb(items=[{"text": "A"}, {"text": "B"}]) | ||
st.write(item) | ||
|
||
st.subheader("Button") | ||
if sy.button(text = "Click!"): | ||
st.write("Clicked!") | ||
|
||
st.subheader("Carousel") | ||
selection = sy.carousel(items=[ | ||
"https://picsum.photos/id/1051/1230/500", | ||
"https://picsum.photos/id/1052/1230/500", | ||
"https://picsum.photos/id/1053/1230/500", | ||
]) | ||
st.write(selection) | ||
|
||
st.subheader("Autocomplete") | ||
complete = sy.autocomplete(data=["Apple", "Bannana", "Cherry"]) | ||
st.write(complete) | ||
|
||
st.subheader("Checkbox") | ||
checked = sy.checkbox(text = "Check me") | ||
st.write(checked) | ||
|
||
st.subheader("Clockpicker") | ||
clock = sy.clockpicker() | ||
st.write(clock) | ||
|
||
st.subheader("Colorpicker") | ||
color = sy.colorpicker() | ||
st.write(color) | ||
|
||
st.subheader("Datepicker") | ||
datepick = sy.datepicker() | ||
st.write(datepick) | ||
|
||
st.subheader("Input") | ||
email = sy.input(type="email", icon="email", default="john@", maxlength="30") | ||
st.write(email) | ||
|
||
st.subheader("Numberinput") | ||
number = sy.numberinput(placeholder="10", min="5") | ||
st.write(number) | ||
|
||
st.subheader("Radio") | ||
radio = sy.radio(radios=[{"text": "A"}, {"text": "B"}]) | ||
st.write(radio) | ||
|
||
st.subheader("Rate") | ||
rate = sy.rate() | ||
st.write(rate) | ||
|
||
st.subheader("Select") | ||
selected = sy.select(data=[{"text": "Seattle"},{"text": "Portland"}]) | ||
st.write(selected) | ||
|
||
st.subheader("Slider") | ||
slide = sy.slider() | ||
st.write(slide) | ||
|
||
st.subheader("Switch") | ||
switched = sy.switch(text="Switch me!") | ||
st.write(switched) | ||
|
||
st.subheader("Tags") | ||
tags = sy.taginput(data=["A", "B", "C"], default=["B"], allow_new=True, open_on_focus=True, type="is-info", aria_close_label="Remove", placeholder="Choose letter") | ||
st.write(tags) | ||
|
||
st.subheader("Message") | ||
sy.message(text="This is a message", title="Info", type="is-info") | ||
|
||
st.subheader("Notification") | ||
sy.notification(text="Important notification") | ||
|
||
st.subheader("Progress") | ||
sy.progress(value=80) | ||
|
||
st.subheader("Steps") | ||
sy.steps(steps=[ | ||
{"step": "1", "label": "First"}, | ||
{"step": "2", "label": "Second"} | ||
]) | ||
|
||
st.subheader("Table") | ||
columns = [ | ||
{ | ||
"field": 'id', | ||
"label": 'ID', | ||
"width": '40', | ||
"numeric": True | ||
}, | ||
{ | ||
"field": 'name', | ||
"label": 'Name', | ||
}, | ||
] | ||
data = [ | ||
{ 'id': 1, 'name': 'Jesse' }, | ||
{ 'id': 2, 'first_name': 'John' }, | ||
] | ||
sy.table(data=data, columns=columns, paginated=True) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.