@extends('layouts.master') @section('title') Forms Elements @endsection @section('page-title') Forms Elements @endsection @section('body')
@endsection @section('content')Here are examples of .form-control
applied to each
textual HTML5 <input>
type
.
Set heights using classes like .form-control-lg
and
.form-control-sm
.
Set horizontally scrollable range inputs using
.form-control-range
.
Use the .form-inline
class to display a series of labels,
form controls, and buttons on a single horizontal row.
The example below uses a flexbox utility to vertically center the
contents and changes .col
to .col-auto
so that your columns only take
up as much space as needed. Put another way, the column sizes itself based on the contents.
Create beautifully simple form labels that float over your input fields.
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.
The file input is the most gnarly of the bunch and requires additional JavaScript if you’d like to hook them up with functional Choose file… and selected file name text.
Create an inline form with .hstack
: