Glassmorphic Card
Glass Card components can be used as elegant containers/wrappers for placing content over images.
# Playground
Realtime Customizations
#Setup
You can import a component and register it as a local and global vue component as follows:
// import the component
import LvGlassCard from 'lightvue/glasscard';
// Register the component locally
export default {
components: {
LvGlassCard
}
}
// Register the component globally (Vue 2.x)
Vue.component('LvGlassCard', LvGlassCard);
// Register the component globally (Vue 3.x)
const app = Vue.createApp({
// ...
});
app.component('LvGlassCard', LvGlassCard);
app.mount('#app')
#APIs
All of the props, events and slots of the component are mentioned below:
Props
Type
Default
Description
backgroundBlur
String
15px
Specify the value for background-blur filter of the card.
backgroundOpacity
String
70
Specify the value for background's opacity, in %, ranging from 0 to 100.
backgroundColor
String
#ffffff
Specify the background color of the card in 6-digit hex format.
padding
String
20px
Specify the padding of the card.
borderRadius
String
4px
Specify the border radius of the card.
showBorder
Boolean
false
Choose whether to show or hide the border.