File size: 873 Bytes
7798609 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
'''
title: Sidebar
'''
import simplestart as ss
ss.md("## ss.sidebar")
ss.md("Display various components in the sidebar on the left side of the screen, such as data controls and some settings.")
ss.md('''
#### π
Example
''')
sidebar = ss.sidebar()
with sidebar:
ss.write("### Sidebar")
ss.button("click")
ss.selectbox(["one", "two", "three"])
def testme(state, value):
with sidebar:
ss.text("text in sidebar")
ss.button("test", onclick = testme)
ss.space()
ss.write("#### π Code")
ss.md('''
```python
import simplestart as ss
sidebar = ss.sidebar()
with sidebar:
ss.button("click")
ss.selectbox(["one", "two", "three"])
def testme(state, value):
with sidebar:
ss.text("text in sidebar")
#or
#sidebar.text("text in sidebar")
ss.button("test", onclick = testme)
```
''') |