Card #
The va-card
is a multipurpose representative component that can be used for anything from links to articles. It has some helper components to make markup easier.
Examples #
Default #
This is default va-card
implementation using va-card-title
, va-card-content
and va-card-actions
helper components.
Color and gradient #
Tag #
Changed tag to <b>
Border, shadow and shape #
Disabled #
Card as link #
Stripe #
Image #
Horizontal #
Actions #
The VaCardActions
component is designed to apply margins and alignment to content (VaButtons
expected).
Two properties can be passed: align
(string, specify how to align actions) and vertical
(boolean, display actions one below the other).
Valid values for align
: left, center, right, between, around, stretch.
API #
Props #
Name | Description | Types | Default |
---|---|---|---|
activeClass |
| - | |
append |
| - | |
bordered |
|
| |
color |
|
| |
disabled |
|
| |
exact |
| - | |
exactActiveClass |
| - | |
gradient |
|
| |
href |
|
| |
outlined |
|
| |
preset |
| - | |
replace |
| - | |
square |
|
| |
stripe |
|
| |
stripeColor |
|
| |
tag |
|
| |
target |
|
| |
textColor |
| - | |
to |
| - |
Events #
Name | Description |
---|---|
click | On click.. The event argument is:
|
Css Variables #
Name | Default Value |
---|---|
--va-card-display | block |
--va-card-position | relative |
--va-card-overflow | visible |
--va-card-box-shadow | var(--va-box-shadow) |
--va-card-border-radius | 0.375rem |
--va-card-color | #34495e |
--va-card-background-color | var(--va-background-secondary) |
--va-card-padding | 1.25rem |
--va-card-outlined-border | 3px solid var(--va-background-element) |
--va-card-outlined-box-shadow | none |
--va-card-stripe-border-size | var(--va-stripe-border-size) |
--va-card-dark-color | #ffffff |
--va-card-dark-background-color | #34495e |
--va-card-actions-btn-margin | 4px |
FAQ #
Can I use va-card
without helper components? #
va-card
without helper components?Yes, if you don't like our styling preset, you are free to use your own.
Should I manually set tag if i use link attributes? #
No, we will do it for you. If tag is not set, but href
is, component tag will be <a>
, if any of router-link prop is set, it will be <router-link>
.