Card Styling
Style Variants
The Card component supports the following style variants:
| Variant | Description | Supported by |
|---|---|---|
| Adds an elevated appearance with a shadow effect | Aura, Lumo |
| Adds a solid border outline to the card | Aura, Lumo |
| Places card content horizontally alongside the media element | Aura, Lumo |
| Stretches the media element to fill the card width or height | Aura, Lumo |
| Allows the media element to cover the cardβs padding area | Aura, Lumo |
Stretch Media
Stretches the media element as wide β or tall, if combined with the horizontal variant β as the card, if the media element is an image, video, or an icon.
Cover Media
Similar to the stretch-media variant, but this variant allows the media element to also cover the padding area of the card. This variant overrides the stretch-media variant.
Style Properties
The following style properties can be used in CSS stylesheets to customize the appearance of this component.
To apply values to these properties globally in your application UI, place them in a CSS block using the html {β¦β} selector.
See Component Style Properties for more information on style properties.
Common Properties
| Property | Supported by |
|---|---|
| Aura, Lumo |
| Aura, Lumo |
| Aura, Lumo |
| Aura, Lumo |
| Aura, Lumo |
| Aura, Lumo |
| Aura, Lumo |
| Aura, Lumo |
| Aura, Lumo |
| Aura, Lumo |
| Aura, Lumo |
| Aura, Lumo |
| Aura, Lumo |
| Aura, Lumo |
| Aura, Lumo |
CSS Selectors
The following CSS selectors can be used in stylesheets to target the various parts and states of the component. See the Styling documentation for more details on how to style components.
- Root element
-
vaadin-card