Card components can be used as flexible containers/wrappers for other UI elements.

# Playground

Heading

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.

 <LvCard
     :shadowStyle="1"
     padding="20px"
     borderRadius="4px"
     backgroundColor="#DBE8EB"
 />
Realtime Customizations





#Shadow

You can change the shadow style of a card by passing value in shadowStyle there are 5 styles present. LightVue card is Both compatible with Vue 2.x and Vue 3.x

#Border Radius

You can set the border radius of card by passing a value along with unit in borderRadius prop

#Background color and Padding

You can change the background color of card by passing a string in backgroundColor.you can also set the padding for card in native way by passing a string in padding prop

#Enabling border

You can set the border to card by setting showBorder prop true

#Setup

You can import a component and register it as a local and global vue component as follows:

// import the component
import LvCard from 'lightvue/card';
// Register the component locally
export default {
    components: {
        LvCard
    }
}
// Register the component globally (Vue 2.x)
Vue.component('LvCard', LvCard);

// Register the component globally (Vue 3.x)
const app = Vue.createApp({
  // ...
});
app.component('LvCard', LvCard);
app.mount('#app')
               

#APIs

All of the props, events and slots of the component are mentioned below:

Props
Type
Default
Description
shadowStyle
Number
1
Choose from a set of predefined shadow styles, ranging from 0 to 5.
borderRadius
String
4px
Specify the border radius of the card.
backgroundColor
String
#fff
Specify the background color of the card.
padding
String
20px
Specify the padding of the card.
showBorder
Boolean
false
Choose whether to show or hide the border.