form controls in bootsrap
To create form controls in Bootstrap, you can use the various form classes and components provided by the framework. Here are some examples:
- Text Input:
<input type="text" class="form-control" placeholder="Enter your name">
- Password Input:
<input type="password" class="form-control" placeholder="Enter your password">
- Select Dropdown:
<select class="form-select" aria-label="Select an option">
<option selected>Select an option</option>
<option value="1">Option 1</option>
<option value="2">Option 2</option>
<option value="3">Option 3</option>
</select>
- Radio Buttons:
<div class="form-check">
<input class="form-check-input" type="radio" name="exampleRadios" id="radio1" value="option1" checked>
<label class="form-check-label" for="radio1">
Option 1
</label>
</div>
<div class="form-check">
<input class="form-check-input" type="radio" name="exampleRadios" id="radio2" value="option2">
<label class="form-check-label" for="radio2">
Option 2
</label>
</div>
- Checkboxes:
<div class="form-check">
<input class="form-check-input" type="checkbox" value="" id="checkbox1">
<label class="form-check-label" for="checkbox1">
Checkbox 1
</label>
</div>
<div class="form-check">
<input class="form-check-input" type="checkbox" value="" id="checkbox2">
<label class="form-check-label" for="checkbox2">
Checkbox 2
</label>
</div>
These examples demonstrate some commonly used form controls in Bootstrap. You can customize them further by adding additional classes or attributes as needed.