forked from streamlit/streamlit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathst_tooltips.py
More file actions
42 lines (38 loc) · 2.01 KB
/
Copy pathst_tooltips.py
File metadata and controls
42 lines (38 loc) · 2.01 KB
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
# Copyright 2018-2020 Streamlit Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import streamlit as st
from datetime import datetime
default_tooltip = """
This is a really long tooltip.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut ut turpis vitae
justo ornare venenatis a vitae leo. Donec mollis ornare ante, eu ultricies
tellus ornare eu. Donec eros risus, ultrices ut eleifend vel, auctor eu turpis.
In consectetur erat vel ante accumsan, a egestas urna aliquet. Nullam eget
sapien eget diam euismod eleifend. Nulla purus enim, finibus ut velit eu,
malesuada dictum nulla. In non arcu et risus maximus fermentum eget nec ante.
""".strip()
st.text_input("some input text", "default text", help=default_tooltip)
st.number_input("number input", value=1, help=default_tooltip)
st.checkbox("some checkbox", help=default_tooltip)
st.radio("best animal", ("tiger", "giraffe", "bear"), 0, help=default_tooltip)
st.button("some button", help=default_tooltip)
st.selectbox("selectbox", ("a", "b", "c"), 0, help=default_tooltip)
st.time_input("time", datetime(2019, 7, 6, 21, 15), help=default_tooltip)
st.date_input("date", datetime(2019, 7, 6, 21, 15), help=default_tooltip)
st.slider("slider", 0, 100, 50, help=default_tooltip)
st.color_picker("color picker", help=default_tooltip)
st.file_uploader("file uploader", help=default_tooltip)
st.multiselect("multiselect", ["a", "b", "c"], ["a", "b"], help=default_tooltip)
st.text_area("textarea", help=default_tooltip)
st.select_slider("selectslider", options=["a", "b", "c"], help=default_tooltip)