Implement Classes
Introduction
This page contains useful class names that can be used to make your app more beautiful without writing CSS. Class names can be added to the properties of page widgets. Several classes can be added to the same widget by separating the class names with a space.
Class names can be entered in two locations:
- The Properties panel of Studio Pro
- The Properties pop-up window for the widget
This how-to teaches you how to do the following:
- Use class names to implement text and background colors, typography, buttons, list views, alerts, and other elements
Text Colors
Add these classes to an element to change the text color to your theme colors:
text-default
: default text colortext-primary
: primary brand colortext-info
: info brand colortext-success
: success brand colortext-warning
: warning brand colortext-danger
: danger brand color
These are standard useful text colors:
text-white
: white texttext-black
: black texttext-gray-primary
: primary gray texttext-gray
: gray texttext-gray-dark
: dark gray texttext-gray-darker
: darker gray texttext-gray-light
: light gray texttext-gray-lighter
: lighter gray text
Background Colors
The background colors are based on your theme colors. These are the same colors as for the buttons:
background-primary
: primary background colorbackground-info
: info background colorbackground-success
: success background colorbackground-warning
: warning background colorbackground-danger
: danger background color
A lighter variant of the background color also sets the matching foreground color:
bg-primary
: primary background colorbg-info
: info background colorbg-success
: success background colorbg-warning
: warning background colorbg-danger
: danger background color
These are background colors for your layout:
background-layout
: default layout backgroundbackground-layout-secondary
: alternative layout backgroundbackground-default
: default layout backgroundbackground-default-dark
: dark layout backgroundbackground-default-darker
: darker layout backgroundbackground-default-light
: light layout backgroundbackground-default-lighter
: lighter layout background
Typography
These are useful classes for text items:
text-normal
: normal texttext-bold
: bold texttext-spacing
: adds spacing to the text bottom and toptext-lined
: underlines the text-linedtext-break
: breaks text over multiple linestext-uppercase
: transforms the text to upper casetext-lowercase
: transforms the text to lower casetext-capitalize
: capitalizes every word
To align texts, add these to the container holding the text:
text-right
: aligns the text to the righttext-center
: aligns the text to the centertext-left
: aligns the text to the left (default)
Other:
nowrap
: don’t wrap texts
Buttons
You can change the appearance of a button:
btn-lg
: large buttonbtn-sm
: small buttonbtn-block
: spans the full width of the parentbtn-bordered
: bordered buttonbtn-transparent
: transparent backgroundbtn-image
: transparent button with image nicely alignpull-right
orbtn-right
: aligns the button to the rightbtn-attached-right
: adds left marginbtn-attached-left
: adds right marginbtn-attached-bottom
: adds top marginbtn-attached-top
: adds bottom margin
Layout Grid
You can change the appearance of a layout grid:
v-center
: vertically aligns elements in a Bootstrap row; add this class on a row in a layout gridno-gutter
: removes padding for Bootstrap columns; add this class on a row in a layout grid
Phones:
For phones, also add col-xs-N
(where N
is the size of the column) to the layout grids to make the columns appear next to each other.
For more information on grid options, including suggestions and examples, see Bootstrap CSS Grid Options.
List View
Change the way items appear in a list:
listview-lined
: list view widget with only a bordered bottom in a list view itemlistview-striped
: list view widget with striped list view itemslistview-seperated
: list view widget with list view items separatedlistview-stylingless
: list view widget without spacing and background
Alerts
Create alerts with standard containers.
alert
: makes an alert of a container; use in combination with the next classesalert-success
: creates a success alertalert-info
: creates an info alertalert-warning
: creates a warning alertalert-danger
: creates a danger alert
Also see Bootstrap Alert Component.
Other
Change the way tabs appear:
tab-mobile
: makes the tab full width and stick to the header
More Bootstrap
Many of these classes are part of Bootstrap. For more information about classes and Bootstrap, see Bootstrap CSS.