Closed
Description
Bootstrap 5 alpha 3 supports floating labels: https://v5.getbootstrap.com/docs/5.0/forms/floating-labels/
It would be nice to enable this in bootstrap_form with an option, something like <%= f.text_field :query, floating: true %>
.
To enable this a few things must be done in the rendering:
- use
form-floating
as the control class - revert order of
input
andlabel
elements - add
placeholder
to input field, fill with label value by default
<div class="form-floating mb-3">
<input placeholder="Search" class="form-control" type="text" name="filter[query]" id="filter_query">
<label for="filter_query">Search</label>
</div>
I would love to pick this up, but if anybody else has the time, please feel free to do so. Would also love feedback on how to enable this functionality, is floating: true
the right way to do that?
Metadata
Metadata
Assignees
Labels
No labels