Button
Button is an extension to standard button element with an option to add icons and your custom theming.
# Playground
#Basic usage
Use the buttons with some basic and complex use cases by passing either classes or props eg. for link button, pass --link-button For disable button, set the disable prop to true. LightVue Button is Both compatible with Vue 2.x and Vue 3.x
#Colors
You can simply change color by changing the class name.You can set the values to suffix to lv-- primary secondary success info warning help danger,complementary
#Deep shadow hover
You can use some deep shadow hover button variation by passing deep-shadow-hover prop
#Setup
You can import a component and register it as a local and global vue component as follows:
// import the component
import LvButton from 'lightvue/button';
// Register the component locally
export default {
components: {
LvButton
}
}
// Register the component globally (Vue 2.x)
Vue.component('LvButton', LvButton);
// Register the component globally (Vue 3.x)
const app = Vue.createApp({
// ...
});
app.component('LvButton', LvButton);
app.mount('#app')
#APIs
All of the props, events and slots of the component are mentioned below: