Basic Preview
Code Example
<div class="form-group"> <label for="formGroupExampleInput" class="form-label">Example label</label> <input type="text" class="form-control" id="formGroupExampleInput" placeholder="Example input placeholder"></div><div class="form-group"> <label for="formGroupExampleInput2" class="form-label">Another label</label> <input type="text" class="form-control" id="formGroupExampleInput2" placeholder="Another input placeholder"></div>
Form grid
Code Example
<div class="row"> <div class="col"> <input type="text" class="form-control" placeholder="First name" aria-label="First name"> </div> <div class="col"> <input type="text" class="form-control" placeholder="Last name" aria-label="Last name"> </div> </div>
Full layout
Code Example
<form class="row g-3"> <div class="col-md-6"> <label for="inputEmail4" class="form-label">Email</label> <input type="email" class="form-control" id="inputEmail4"> </div> <div class="col-md-6"> <label for="inputPassword4" class="form-label">Password</label> <input type="password" class="form-control" id="inputPassword4"> </div> <div class="col-12"> <label for="inputAddress" class="form-label">Address</label> <input type="text" class="form-control" id="inputAddress" placeholder="1234 Main St"> </div> <div class="col-12"> <label for="inputAddress2" class="form-label">Address 2</label> <input type="text" class="form-control" id="inputAddress2" placeholder="Apartment, studio, or floor"> </div> <div class="col-md-6"> <label for="inputCity" class="form-label">City</label> <input type="text" class="form-control" id="inputCity"> </div> <div class="col-md-4"> <label for="inputState" class="form-label">State</label> <select id="inputState" class="form-select"> <option selected>Choose...</option> <option>...</option> </select> </div> <div class="col-md-2"> <label for="inputZip" class="form-label">Zip</label> <input type="text" class="form-control" id="inputZip"> </div> <div class="col-12"> <div class="form-check align-items-center"> <input class="form-check-input" type="checkbox" id="gridCheck"> <label class="form-check-label" for="gridCheck"> Check me out </label> </div> </div> <div class="col-12"> <button type="submit" class="btn btn-primary">Sign in</button> </div></form>
Horizontal form
Code Example
<form> <div class="row mb-3"> <label for="inputEmail3" class="col-sm-2 col-form-label">Email</label> <div class="col-sm-10"> <input type="email" class="form-control" id="inputEmail3"> </div> </div> <div class="row mb-3"> <label for="inputPassword3" class="col-sm-2 col-form-label">Password</label> <div class="col-sm-10"> <input type="password" class="form-control" id="inputPassword3"> </div> </div> <fieldset class="row mb-3"> <legend class="col-form-label col-sm-2 pt-0">Radios</legend> <div class="col-sm-10"> <div class="form-check align-items-center d-flex form-check-sm"> <input class="form-check-input" type="radio" name="gridRadios" id="gridRadios1" value="option1" checked> <label class="form-check-label" for="gridRadios1"> First radio </label> </div> <div class="form-check align-items-center d-flex form-check-sm"> <input class="form-check-input" type="radio" name="gridRadios" id="gridRadios2" value="option2"> <label class="form-check-label" for="gridRadios2"> Second radio </label> </div> <div class="form-check align-items-center d-flex form-check-sm disabled"> <input class="form-check-input" type="radio" name="gridRadios" id="gridRadios3" value="option3" disabled> <label class="form-check-label" for="gridRadios3"> Third disabled radio </label> </div> </div> </fieldset> <div class="row mb-3"> <div class="col-sm-10 offset-sm-2"> <div class="form-check align-items-center d-flex form-check-sm"> <input class="form-check-input" type="checkbox" id="gridCheck1"> <label class="form-check-label" for="gridCheck1"> Example checkbox </label> </div> </div> </div> <button type="submit" class="btn btn-primary">Sign in</button></form>
Column sizing
Code Example
<div class="row g-3"> <div class="col-sm-7"> <input type="text" class="form-control" placeholder="City" aria-label="City"> </div> <div class="col-sm"> <input type="text" class="form-control" placeholder="State" aria-label="State"> </div> <div class="col-sm"> <input type="text" class="form-control" placeholder="Zip" aria-label="Zip"> </div> </div>
Auto-sizing
Code Example
<form class="row gy-2 gx-3 align-items-center"> <div class="col-auto"> <label class="visually-hidden" for="autoSizingInput">Name</label> <input type="text" class="form-control" id="autoSizingInput" placeholder="Jane Doe"> </div> <div class="col-auto"> <label class="visually-hidden" for="autoSizingInputGroup">Username</label> <div class="input-group"> <div class="input-group-text">@</div> <input type="text" class="form-control" id="autoSizingInputGroup" placeholder="Username"> </div> </div> <div class="col-auto"> <label class="visually-hidden" for="autoSizingSelect">Preference</label> <select class="form-select" id="autoSizingSelect"> <option selected>Choose...</option> <option value="1">One</option> <option value="2">Two</option> <option value="3">Three</option> </select> </div> <div class="col-auto"> <div class="form-check align-items-center"> <input class="form-check-input" type="checkbox" id="autoSizingCheck"> <label class="form-check-label" for="autoSizingCheck"> Remember me </label> </div> </div> <div class="col-auto"> <button type="submit" class="btn btn-primary">Submit</button> </div> </form>
You can then remix that once again with size-specific column classes.
Code Example
<form class="row gx-3 gy-2 align-items-center"> <div class="col-sm-3"> <label class="visually-hidden" for="specificSizeInputName">Name</label> <input type="text" class="form-control" id="specificSizeInputName" placeholder="Jane Doe"> </div> <div class="col-sm-3"> <label class="visually-hidden" for="specificSizeInputGroupUsername">Username</label> <div class="input-group"> <div class="input-group-text">@</div> <input type="text" class="form-control" id="specificSizeInputGroupUsername" placeholder="Username"> </div> </div> <div class="col-sm-3"> <label class="visually-hidden" for="specificSizeSelect">Preference</label> <select class="form-select" id="specificSizeSelect"> <option selected>Choose...</option> <option value="1">One</option> <option value="2">Two</option> <option value="3">Three</option> </select> </div> <div class="col-auto"> <div class="form-check align-items-center"> <input class="form-check-input" type="checkbox" id="autoSizingCheck2"> <label class="form-check-label" for="autoSizingCheck2"> Remember me </label> </div> </div> <div class="col-auto"> <button type="submit" class="btn btn-primary">Submit</button> </div> </form>
Inline forms
Code Example
<form class="row row-cols-lg-auto g-3 align-items-center"> <div class="col-12"> <label class="visually-hidden" for="inlineFormInputGroupUsername">Username</label> <div class="input-group"> <div class="input-group-text">@</div> <input type="text" class="form-control" id="inlineFormInputGroupUsername" placeholder="Username"> </div> </div> <div class="col-12"> <label class="visually-hidden" for="inlineFormSelectPref">Preference</label> <select class="form-select" id="inlineFormSelectPref"> <option selected>Choose...</option> <option value="1">One</option> <option value="2">Two</option> <option value="3">Three</option> </select> </div> <div class="col-12"> <div class="form-check align-items-center"> <input class="form-check-input" type="checkbox" id="inlineFormCheck"> <label class="form-check-label" for="inlineFormCheck"> Remember me </label> </div> </div> <div class="col-12"> <button type="submit" class="btn btn-primary">Submit</button> </div> </form>
Template used forms
Register form example
Create your account
Already have an account? Sign in instead
Code Example
<div class="wide-sm mx-auto"> <div class="card"> <div class="card-body md"> <div class="card-title text-center"> <em class="icon icon-circle ni ni-user-add-fill md mb-3"></em> <h4 class="title mb-2 fw-bold">Create your account</h4> <p class="meta">Sign up with your email and get started with your free account</p> </div> <form action="#" class="pt-4"> <div class="form-group"> <label class="form-label">Full Name</label> <div class="form-control-wrap"> <div class="form-icon form-icon-left"> <em class="icon ni ni-user"></em> </div> <input type="text" class="form-control" placeholder="Enter your name here"> </div> </div> <div class="form-group"> <label class="form-label">Email</label> <div class="form-control-wrap"> <div class="form-icon form-icon-left"> <em class="icon ni ni-mail"></em> </div> <input type="text" class="form-control" placeholder="Enter your email"> </div> </div> <div class="form-group"> <label class="form-label">Password</label> <div class="form-control-wrap"> <div class="form-icon form-icon-left"> <em class="icon ni ni-lock"></em> </div> <input type="password" class="form-control password" id="password" placeholder="Password"> <a href="password" class=" form-icon form-icon-right password-toggle" title="Toggle show/hide pasword"> <em class="password-shown ni ni-eye"></em> <em class="password-hidden ni ni-eye-off"></em> </a> </div> </div> <div class="form-group"> <div class="form-check form-check-border form-check-sm align-items-md-center"> <input class="form-check-input" type="checkbox" value="" id="flexCheckDefault6"> <label class="form-check-label" for="flexCheckDefault6"> I agree to the <a href="#">User Agreement</a> and <a href="#">Privacy Policy</a> </label> </div> </div> <div class="form-group"> <button class="btn btn-lg btn-primary btn-block" type="button">Sign up</button> </div> </form> <div class="form-note text-center py-3 small"> Already have an account? <a href="#">Sign in instead</a> </div> </div> </div> </div>
Template used forms
Login form example
Login to your account
New on our platform? Create account
Code Example
<div class="wide-sm mx-auto"> <div class="card"> <div class="card-body md"> <div class="card-title text-center"> <em class="icon icon-circle ni ni-user-check-fill md mb-3"></em> <h4 class="title mb-2 fw-bold">Login to your account</h4> <p class="meta">Login into your account to purchase ICO tokens</p> </div> <form action="#" class="pt-4"> <div class="form-group"> <label class="form-label">Email</label> <div class="form-control-wrap"> <div class="form-icon form-icon-left"> <em class="icon ni ni-mail"></em> </div> <input type="text" class="form-control" placeholder="Enter your email"> </div> </div> <div class="form-group"> <label class="form-label">Password</label> <div class="form-control-wrap"> <div class="form-icon form-icon-left"> <em class="icon ni ni-lock"></em> </div> <input type="password" class="form-control password" id="password" placeholder="Password"> <a href="password" class=" form-icon form-icon-right password-toggle" title="Toggle show/hide pasword"> <em class="password-shown ni ni-eye"></em> <em class="password-hidden ni ni-eye-off"></em> </a> </div> </div> <div class="form-group d-flex flex-wrap align-items-center justify-content-between"> <div class="form-check form-check-border form-check-sm align-items-center"> <input class="form-check-input" type="checkbox" value="" id="flexCheckDefault5"> <label class="form-check-label" for="flexCheckDefault5"> Remember me </label> </div> <div class="form-action-link"> <a href="#" class="small">Forgot password?</a> </div> </div> <div class="form-group"> <button class="btn btn-lg btn-primary btn-block" type="button">Login</button> </div> </form> <div class="form-note text-center py-3 small"> New on our platform? <a href="#">Create account</a> </div> </div> </div> </div>