The (for instance) "horizontal form" code example of the Form
component of the dash bootstrap components documentation (https://dash-bootstrap-components.opensource.faculty.ai/docs/components/form/) looks like this:
# ...
email_input = dbc.Row(
[
dbc.Label("Email", html_for="example-email-row", width=2),
dbc.Col(
dbc.Input(
type="email", id="example-email-row", placeholder="Enter email"
),
width=10,
),
],
className="mb-3",
)
# ...
Why is the Input
component in a Col
, but the Label
is not?