forked from austinlasseter/flying-dog-beers
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathform elements.py
102 lines (99 loc) · 2.79 KB
/
form elements.py
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
import dash_bootstrap_components as dbc
import dash_core_components as dcc
import dash_html_components as html
controls = dbc.FormGroup(
[
html.P('Dropdown', style={ #The <p> tag defines a paragraph.
'textAlign': 'center'
}),
dcc.Dropdown(
id='dropdown',
options=[{
'label': 'Value One',
'value': 'value1'
}, {
'label': 'Value Two',
'value': 'value2'
},
{
'label': 'Value Three',
'value': 'value3'
},
{
'label': 'Value Four',
'value': 'value4'
},
{
'label': 'Value Five',
'value': 'value5'
}
],
value=['value1'], # default value
multi=True
),
html.Br(), #The HTML <br> element produces a line break in text (carriage-return). It is useful for writing a poem or an address, where the division of lines is significant.
html.P('Range Slider', style={ #The <p> tag defines a paragraph.
'textAlign': 'center'
}),
dcc.RangeSlider(
id='range_slider',
min=0, # this was 0
max=20, #this was 20
step=0.5,
value=[5, 15]
),
html.P('Check Box', style={
'textAlign': 'center'
}),
dbc.Card([dbc.Checklist(
id='check_list',
options=[{
'label': 'Value One',
'value': 'value1'
},
{
'label': 'Value Two',
'value': 'value2'
},
{
'label': 'Value Three',
'value': 'value3'
}
],
value=['value1', 'value2'],
inline=True
)]),
html.Br(),
html.P('Radio Items', style={
'textAlign': 'center'
}),
dbc.Card([dbc.RadioItems(
id='radio_items',
options=[{
'label': 'Value One',
'value': 'value1'
},
{
'label': 'Value Two',
'value': 'value2'
},
{
'label': 'Value Three',
'value': 'value3'
}
],
value='value1',
style={
'margin': 'auto'
}
)]),
html.Br(),
dbc.Button(
id='submit_button',
n_clicks=0,
children='Submit',
color='primary',
block=True
),
]
)