@paolagd/vue3-button
v1.0.5
Published
A simple button component for Vue 3
Downloads
2
Readme
Vue Custom Button
This is a reusable and customizable button component for Vue 3 applications. You can customize the button's label, color, and click event handler.
Installation
You can install this component via Yarn:
yarn add @paolagd/vue3-button
Usage
Usage Here's an example of how to use this component in your Vue 3 application:
<template>
<custom-button
label="Click me"
color="bg-red-500"
:onClick="() => console.log('Button clicked!')"
/>
</template>
<script>
import CustomButton from '@paolagd/vue3-button';
export default {
components: {
CustomButton
},
};
</script>
Props
label
(String, required): The button's label.color
(String, optional, default: '#f0f0f0'): The button's background color.onClick
(Function, optional, default:() => {}
): The function to execute when the button is clicked.
***** This button is just to test the npm package