<b-form-input>
defaults to a text input, but you can set the type
prop to one of the supported native browser HTML5 types: text
, password
, email
, number
, url
, tel
, search
, date
, datetime
, datetime-local
, month
, week
, time
, range
, or color
.
<b-container fluid>
<b-row class="my-1">
<b-col sm="2">
<label for="input-small">Small:</label>
</b-col>
<b-col sm="10">
<b-form-input id="input-small" size="sm" placeholder="Enter your name"></b-form-input>
</b-col>
</b-row>
<b-row class="my-1">
<b-col sm="2">
<label for="input-default">Default:</label>
</b-col>
<b-col sm="10">
<b-form-input id="input-default" placeholder="Enter your name"></b-form-input>
</b-col>
</b-row>
<b-row class="my-1">
<b-col sm="2">
<label for="input-large">Large:</label>
</b-col>
<b-col sm="10">
<b-form-input id="input-large" size="lg" placeholder="Enter your name"></b-form-input>
</b-col>
</b-row>
</b-container>
Set heights using the size
prop to sm
or lg
for small or large respectively.
<b-container fluid>
<b-row class="my-1">
<b-col sm="3">
<label for="input-none">No State:</label>
</b-col>
<b-col sm="9">
<b-form-input id="input-none" :state="null" placeholder="No validation"></b-form-input>
</b-col>
</b-row>
<b-row class="my-1">
<b-col sm="3">
<label for="input-valid">Valid State:</label>
</b-col>
<b-col sm="9">
<b-form-input id="input-valid" :state="true" placeholder="Valid input"></b-form-input>
</b-col>
</b-row>
<b-row class="my-1">
<b-col sm="3">
<label for="input-invalid">Invalid State:</label>
</b-col>
<b-col sm="9">
<b-form-input id="input-invalid" :state="false" placeholder="Invalid input"></b-form-input>
</b-col>
</b-row>
</b-container>
Bootstrap includes validation styles for valid
and invalid
states on most form controls.