0.2.3 • Published 4 years ago

@bulma-web/card v0.2.3

Weekly downloads
7
License
MIT
Repository
github
Last release
4 years ago

card

bw-card is an easy customizable card with css custom properties, styling for bulma is included

Usage

installation

npm i -S @bulma-web/card
# or
yarn add -S @bulma-web/card
import '@bulma-web/card'

Example

<bw-card>
    <div slot="content">
        <h2>
            “There are two hard things in computer science: cache invalidation, naming things, and off-by-one errors.”
        </h2>
        <p>Jeff Atwood</p>
    </div>
</bw-card>

API

Slots

slot nameDescription
contentContent to display in card
header-titletitle ot be placed for card header
header-iconicon to be displayed in the outer right of the card header
imageimage to be added in the card
footer-itemitems to be placed in the footer of the card

custom css variables for customization

VariableDescriptionType
--card-colortext color for the cardcolor code
--card-background-colorbackground color of the cardcolor code
--card-shadowcard shadowbox shadow
--card-header-background-colorbackground color for the card headercolor code
--card-header-colortext color for the card headercolor code
--card-header-paddingpadding size for the card headerunit size
--card-header-shadowshadow for card headernox shadow notation
--card-header-weightfont weight for card headerunits
--card-content-background-colorbackground color for cardcolor code
--card-content-paddingpadding for card contentunit size
--card-footer-background-colorbackground color for the card footercolor code
--card-footer-border-topborder top of card footercdd border shorthand notation
--card-footer-paddingpadding for card footerunit size
--card-media-marginmargin for card mediaunit size