Form Elements page header description goes here...
Textual form controls—like
<textarea>s—are styled with the .form-control class. Included are styles for general appearance, focus state, sizing, and more. Please read the official Bootstrap documentation for the full list of options.
Set heights using classes like
Add the readonly boolean attribute on an input to prevent modification of the input’s value. Read-only inputs appear lighter (just like disabled inputs), but retain the standard cursor.
Readonly plain text
If you want to have
<input readonly> elements in your form styled as plain text, use the .form-control-plaintext class to remove the default form field styling and preserve the correct margin and padding.
Set horizontally scrollable range inputs using
Default checkboxes are improved upon with the help of
.form-check, a single class for both input types that improves the layout and behavior of their HTML elements.
Default radios are improved upon with the help of
.form-check, a single class for both input types that improves the layout and behavior of their HTML elements. You can use Bootstrap custom radio for styled radio button.
A switch has the markup of a custom checkbox but uses the
.form-switch class to render a toggle switch. Switches also support the disabled attribute.
Custom <select> menus need only a custom class, .form-select to trigger the custom styles. Custom styles are limited to the <select>’s initial appearance and cannot modify the <option>s due to browser limitations.
More complex forms can be built using bootstrap grid classes. Use these for form layouts that require multiple columns, varied widths, and additional alignment options.
Block-level help text in forms can be created using
.form-text. Inline help text can be flexibly implemented using any inline HTML element and utility classes like
Place one add-on or button on either side of an input. You may also place one on both sides of an input. Remember to place
<label> outside the input group.