Make sure you are familiar with Bootstrap 4's general structure and what's available out-of-the-box. Review their documentation on proper use of the The Grid System and Responsive Utilities in particular, these sections are imperative to writing Bootstrap semantic markup and will save you time with responsive work.
Standard sizes for Bootstrap 4 are based off xs, sm, md, lg and xl references:
Get Started
Any of the elements and components found within this UI Kit are ready to use! Just copy and paste. We've made a point of including accessibility attributes—these are important for those who use screen readers and other assistance tools, don't forget to update them so they are logical in the context you are using them in.
Buttons
Default Buttons
These are the two main button classes. 'Default' should be used in most instances, unless drawing attention to an important action. Link buttons are great for a subtle effect and for areas that are cramped for space, such as within modal footers and sidebars.
Add a raised effect to a button by adding the .btn-raised class.
The circular Floating Action Button, or .btn-fab buttons, should be reserved only for appropriate important page actions. A Floating Action Button should only be used ONCE per page. See Google's Documentation.
With BS4, any element can trigger an expandable area using the data-target attribute. Add a rotating arrow to the end of your trigger to help itentify its function.
Don't forget the aria-expanded and aria-controls accessbility markup!
Use typography styles as defined in Bootstrap. We will review a few key typography style options here on this page, but you should refer to Bootstrap's documentation for the full range of options.
Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor. Duis mollis, est non commodo luctus.
Small paragraph
This line of text is meant to be treated as fine print.
<h5>Lead paragraph</h5>
<p class="lead">Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor. Duis mollis, est non commodo luctus.</p>
<h5>Small paragraph</h5>
<small>This line of text is meant to be treated as fine print.</small>
Blockquote, Address Block, List Styles + more! Knowing these Text Utilities is handy when you need to format text. Here are just a few options:
Reverse Blockquote
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.
Address Block
Twitter, Inc.
1355 Market Street, Suite 900
San Francisco, CA 94103
P: (123) 456-7890
Unstyled List
Integer molestie lorem at massa
Nulla volutpat aliquam velit
Phasellus iaculis neque
Purus sodales ultricies
Faucibus porta lacus fringilla vel
IMPORTANT! Again, these are just a few examples to get you started. For a full-list and in-depth customization options, please refer to the Bootstrap documentation.
Make use of utilities for styling, sizing and aligning elements. Utility classes include things like .float-md-left, .clearfix, .rounded-circle, .text-success and .text-md-left.
Here are just a few examples, please see the Bootstrap documentation for the full list of options.
Border Radius + Sizing
Image has border radius of 50% and a width of 100%;
Make 'success' text and align to middle for screens larger than 'md' breakpoint.
Make 'info' text and align to middle for screens larger than 'md' breakpoint.
Make 'warning' text and align to right always.
Make 'danger' text and align to right always.
<p class="text-success text-md-center">Make 'success' text and align to middle for screens larger than 'md' breakpoint.</p>
<p class="text-danger text-right">Make 'danger' text and align to right always.</p>
Close Button
Quickly add a close button to an element. Use a float class to pull to to the right side if you like.
Responsive Embed
Responsive embeds: video, object, iframe or embed element dimensions can be scaled proportionately by a 16:9 aspect ratio using .embed-responsive.embed-responsive-16by9. Or select a different ratio.
Use the .entry class to seperate entries in a list. Use the container class .entry-log to house the entries in a scrollable area with a max-height: 600px.
Entries that show before and after changes should use .col columns to seperate the original and edited content. Use .entry-subtration s to cross out the value that was changed and .entry-addition span to hilight the new value.
TIP: Use collapse functionality to save vertical space. The example below shows two entries using columns to compare before and after states. And they have been tucked into a collapsible area to save space.
If you haven't already, we highly recommend brushing up on the Responsive Layout Utilities, like .hidden-lg-down and .hidden-sm-up, to be aware of ways to easily show or hide content/elements based on screen size.
These classes are especially helpful when designing for smaller screens. A simple example would be hiding text within a button on mobile devices to save horizontal space.
We are using Google's Material Design (GMD) icon set. Google provides a full library of the icons. Just navigate to the Full Icon Set, then copy and paste icons!
IMPORTANT! You do not need to link to the font stylesheet shown below if you are working within one of the re-branded Lone Wolf products; the link should already be included in the head of the document. This link is only provided for reference if your project is starting from scratch.
Show the status of an element with text and color to give the user an idea of the status at a quick glance. The user can quickly identify if the status is good or bad and an action needs to be taken.
Cards are introduced in Bootstrap 4, but go ahead and use them now whenever you want.
A card is a flexible and extensible content container. It includes options for headers and footers, a wide variety of content, contextual background colors, and powerful display options. If you're familiar with Bootstrap 3, cards replace our old panels, wells, and thumbnails. Similar functionality to those components is available as modifier classes for cards. — Source.
Cards accept a variety of structural and class mix-ins to quickly change their look, such as .card-primary+ .card-inverse, .text-xs-center, .card-primary-outline, .card-secondary-outline, and .card-raised.
Add headers and footers to the .card-block with .card-header and .card-footer.
Some quick example text to build on the card title and make up the bulk of the card's content.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.
<div class="card">
<div class="card-header">
Featured Card Header
</div>
<div class="card-block">
<h4 class="card-title">Special title here</h4>
<p class="card-text">Some quick example text to build on the card title and make up the bulk of the card's content.</p>
</div>
</div>
Widget Cards
Introduce a slight raise to your card. Best for use on Dashboards.
Dropdowns should be used for hiding a menu of action items or a selection of related items.
Use either a .btn combined with the .dropdown-toggle class, or the more_vert Material Icon to indicate a dropdown. The .dropdown-toggle class will automatically include a caret triangle ::after the button text.
The dropdown menus that come with Bootstrap 4 are more flexible: you can use traditional ulli markup, plain a tags or even buttons. Just ensure you have the .dropdown-item class added. New with BS 4 is the option to quick
IMPORTANT! To position the dropdown menu correctly when active, both the trigger button and the dropdown menu need to be in a container with the .dropdown class applied.
Alternate row background colours with .table-striped. Use the .table-hover to add row highlight on :hover.
For tables that contain many action items, make use of the .btn-group + .dropdown-toggle + .dropdown-menu combination. Read more about Button Groups and Dropdowns above.
Use tablesorter.js to sort and filter data within tables using the inputs within the thead. You must include thead in your table for tablesorter.js to work!
Additionally, we pair the Bootstrap 3 Theme with the base plugin, so be sure to include the related CSS files for it.
We restyled the classic Bootstrap Modal and gave it a cleaner look. IMPORTANT! Ensure you use the Material Design .material-icons icon for the close button.
Size variations are .modal-sm, .modal-lg, and .modal-xl. Place any of these classes on the .modal-dialog to change the width of the modal.
<!-- Button trigger modal -->
<button class="btn btn-primary btn-raised" data-toggle="modal" data-target="#myModal">
Launch demo modal
</button>
<!-- Modal Example -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title" id="myModalLabel">Modal title</h4>
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true" class="material-icons">clear</span></button>
</div>
<div class="modal-body">
Material icons are beautifully crafted, delightful, and easy to use in your web, Android, and iOS projects. Learn more about material design and our process for making these icons in the system icons section of the material design guidelines.
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Cancel</button> <button type="button" class="btn btn-primary" data-dismiss="modal">Okay</button>
</div>
</div>
</div>
</div>
Alerts
For these alert examples we used the .container-fluid class, so they will be fluid, please use the class .container when you use them outside of the .wrapper so they will be aligned with the general page container.
IMPORTANT! Ensure you use the Material Design .material-icons icon for the close button.
Regular ol' alert: When you have a moment, read our Tips To Get Started guide to learn what our apps can do for you.
info_outline
Info Alert: Your Ticket #33333 has been updated.
check
Success Alert: The changes you made have been saved.
warning
Warning Alert: Your account does not have an associated MLS ID.
error_outline
Error Alert: You've hit an error, please check your information and try again.
<div class="alert alert-info" role="alert" aria-label="REPLACE ME" aria-describedby="REPLACE ME">
<div class="container-fluid">
<div class="alert-icon" aria-hidden="true">
<i class="material-icons">info_outline</i>
</div>
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<i class="material-icons" aria-hidden="true">clear</i>
</button>
<span id="REPLACE ME"><b>Info Alert:</b> Your Ticket #33333 has been updated.</span>
</div>
</div>
Empty/Default State for Lists
In some cases a table/list will be empty and should be replaced with the example below. If you're unsure please reference the project prototype or contact Design.
IMPORTANT! The verbiage in the empty list container should be updated to reflect the area it's within.
For use on White Background
This list has no items.
For use on Darker Background
Extra class is added to remove background color. lw-empty-list-transparent
This list has no items.
<div class="lw-empty-list">
<p>
This list has no items.<br>
<button class="btn btn-primary" data-toggle="modal" data-target="#addItem">Add Items</button>
</p>
</div>
<div class="lw-empty-list lw-empty-list-transparent">
<p>
This list has no items.<br>
<button class="btn btn-primary" data-toggle="modal" data-target="#addItem">Add Items</button>
</p>
</div>
Modal title
Material icons are beautifully crafted, delightful, and easy to use in your web, Android, and iOS projects. Learn more about material design and our process for making these icons in the system icons section of the material design guidelines.
About This Screen
Dashboard
The dashboard is the central page for all information and updates and is fully configurable through the use of dashlets. Unlock the screen to add, remove, or change settings on a dashlet.