2.45.0 • Published 3 months ago

@vonage/vwc-card v2.45.0

Weekly downloads
-
License
ISC
Repository
github
Last release
3 months ago

vwc-card

Cards contain content and actions about a single subject.

Usage

<vwc-card heading="Hello Card!" icon="home">
   <div slot="media">Some media</div>
   <vwc-button slot="footer">Action Button</vwc-button>
</vwc-card>

API

Properties/Attributes

nameattr/prop/reflectedtypedescription
headingreflectedstringThe heading text
subtitlereflectedstringThe sub-heading text
textreflectedstringThe card text
iconreflectedstringA valid vivid icon type
elevationreflectedstringcontrol the card elevation dp

Slots

namedescription
graphicContent to show in the header icon section. If exists, overrides the header-icon attribute’s definition
metaSlot for action content in the card header
mediaSlot to add anything inside the media area
footerSlot for action content placed the card footer
mainSlot for content of the card. If exist, overrides the heading, subtitle, card-text and header-icon

Styling tips

Setting card's width

The width of the card is set via its wrapper's width. Hence, if you wrap a card like this:

<div class="card-wrapper">
 <vwc-card></vwc-card>
</div>

Then your style should have:

.card-wrapper {
 width: 300px;
}

Using the cards in a grid

Please see this example: Grid Example

CSS Custom Properties

PropertyDefaultDescription
--title-line-clampnoneControls the number of lines of the title that will be present before trim & ellipsis
--subtitle-line-clampnoneControls the number of lines of the sub-title that will be present before trim & ellipsis
2.45.0

3 months ago

2.43.0

10 months ago

2.43.2

9 months ago

2.43.1

10 months ago

2.44.0

8 months ago

2.41.0

11 months ago

2.42.0

11 months ago

2.38.0

1 year ago

2.39.1

1 year ago

2.39.0

1 year ago

2.37.2

1 year ago

2.40.0

1 year ago

2.36.3

1 year ago

2.36.2

1 year ago

2.37.0

1 year ago

2.36.0

2 years ago

2.36.1

2 years ago

2.35.0

2 years ago

2.32.0

2 years ago

2.31.0

2 years ago

2.34.0

2 years ago

2.33.1

2 years ago

2.33.0

2 years ago

2.34.1

2 years ago

2.29.0

2 years ago

2.28.1

2 years ago

2.28.0

2 years ago

2.28.2

2 years ago

2.30.2

2 years ago

2.30.1

2 years ago

2.30.3

2 years ago

2.30.0

2 years ago

2.27.1

2 years ago

2.27.0

2 years ago

2.26.0

2 years ago

2.25.10

2 years ago

2.25.9

2 years ago

2.25.8

2 years ago

2.25.7

2 years ago

2.25.6

2 years ago

2.25.5

2 years ago

2.25.3

2 years ago

2.25.2

2 years ago

2.25.1

2 years ago

2.25.0

2 years ago

2.24.1

2 years ago

2.24.0

2 years ago

2.23.0

2 years ago

2.22.1

3 years ago

2.22.0

3 years ago

2.21.1

3 years ago

2.21.0

3 years ago

2.20.1

3 years ago

2.20.0

3 years ago

2.19.0

3 years ago

2.18.1

3 years ago

2.18.0

3 years ago