The card component comprises several elements that you can mix and match:
-
card
: the main container
-
card-header
: a horizontal bar with a shadow
-
card-header-title
: a left-aligned bold text
-
card-header-icon
: a placeholder for an icon
-
card-image
: a fullwidth container for a responsive image
-
card-content
: a multi-purpose container for any other element
-
card-footer
: a horizontal list of controls
-
card-footer-item
: a repeatable list item
You can center the card-header-title
by appending the is-centered
modifier.
To create a hover effect on the card, add the .is-hover
class. This comes in handy when working with anchors and can be combined with the other card modifiers.
You can change the background color of the card
by using one of the 9 color modifiers:
is-primary
is-secondary
is-success
is-warning
is-danger
is-black
is-dark
is-light
is-white
To display an image inside a card
without any spacing, add one of the following classes to the card-image
element. Mind that you need to modify the source order accordingly.
You can also divide a card into header and footer — around the default body. Just add the .card-header
or .card-footer
class to a element inside the card.
You can use these variables to customize this component. Simply set one or multiple of these variables before importing Elenore. Learn how.