Hope support sidebar! #428
fengguo-awx
started this conversation in
Feature request
Replies: 1 comment 1 reply
-
Here is a simple implement: import pywebio
from pywebio.output import *
from pywebio.pin import *
from pywebio.session import *
css = """
#pywebio-scope-side-bar {
position: fixed;
width: 340px;
left: 0;
top: 0;
bottom: 0;
padding: 30px;
background-color: #f0f2f6;
overflow-y: scroll;
}
#pywebio-scope-ROOT {
margin-left: 350px;
}
/* Works on Firefox */
* {
scrollbar-width: thin;
}
/* Works on Chrome, Edge, and Safari */
*::-webkit-scrollbar {
width: 7px;
}
*::-webkit-scrollbar-track {
background: transparent;
}
*::-webkit-scrollbar-thumb {
background-color: gray;
border-radius: 20px;
border: 2px
}
"""
@pywebio.config(css_style=css)
def main():
"""Foo"""
set_env(output_max_width='90%')
put_markdown('# APP title')
with use_scope('side-bar'):
put_input('a', label='A')
put_input('b', label='B')
put_input('c', label='C')
put_button('SUBMIT', onclick=lambda: put_text(pin['a'], pin['b'], pin['c']))
if __name__ == '__main__':
pywebio.start_server(main, port=8080, debug=True) |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
streamlit supports sidebar, hope PyWebIO supports sidebar soon.
Beta Was this translation helpful? Give feedback.
All reactions