Cards
Last updated
Last updated
Basic Cards in Pages follow the exact same markup of .cards
in Bootstrap. Going a step further we have added Card tools to enhance your web app experience.
Card scroll
Create a basic Card using .card
just like in Bootstrap. To make the Card body scrollable, simply add .scrollable
to the .card-block
. Then create a new wrapper element as the immediate child of the .card-block
containing the all the content and set it a height
or max-height
Append .separator
to your .card-header
to separator between card header and card bodyBASIC CARDS...
Replace .card-default
with .card-transparent
to make the background of a Card transparentBASIC CARDS...
Use any contextual background color with Cards by appending .bg-*
(ex: .bg-success
) to .card
. Text color of the card body can also be changed by adding any .text-*
contextual color classBASIC CARDS...
Append .card-condensed
to reduce padding of .card-header
and .card-block
BASIC CARDS...
Example
Convert traditional Bootstrap cards into Cards using Pages Cards jQuery plugin. The following Card controls are available:
Collapse
Refresh
Close
Settings
Resize
Cards can be initialized using either data attributes or via Javascript. However if you need to have a refresh button within your Card it is a must that you follow the latter which enables you to bind a refresh callback function.
Via data attributes
Via Javascript
NAME
TYPE
DEFAULT
DESCRIPTION
progress
string
'circle'
Sets the progress indicator which is shown when the refresh button is clicked. Styles available are 'bar', 'circle' and 'circle-lg'
progressColor
string
'master'
Change the color of the progress indicator. Follows the Pages contextual color naming convention. Note: 'white' color is only available for progress 'circle-lg'
refresh
boolean
false
Toggle progress indicator by setting this option. ex: Set this to 'false' from inside onRefresh
function to hide the progress indicator
error
string
null
Slide-in an error message inside the Card. Recommended to be used when notifying the user about a failed refresh callback
overlayColor
string
'white'
Change the color of overlay which is shown while the refresh process is in progress. Any hex color code is accepted
overlayOpacity
number
0.6
Change the opacity of the overlay. Use any value between 0 and 1
onRefresh
function
undefined
Called when the [data-toggle="refresh"] button is clicked
onCollapse
function
undefined
Called when the [data-toggle="collapse"] button is clicked
onExpand
function
undefined
Called when the [data-toggle="refresh"] button is clicked while the Card is being collapsed
onMaximize
function
undefined
Called when the [data-toggle="maximize"] button is clicked
onRestore
function
undefined
Called when the [data-toggle="maximize"] button is clicked while the Card is being maximized
onClose
function
undefined
Called when the [data-toggle="close"] button is clicked