🚀 DAY 5 OF LAUNCH WEEK: Introducing Socket Firewall Enterprise.Learn more
Socket
Book a DemoInstallSign in
Socket

@vuesimple/vs-button

Package Overview
Dependencies
Maintainers
0
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vuesimple/vs-button

A simple vue button. Perfect for all your button scenarios.

latest
Source
npmnpm
Version
3.0.9
Version published
Maintainers
0
Created
Source

Vue Simple Button

🗃 A simple vue button.

A light weight vue plugin built groundup.

npm npm

forthebadge forthebadge forthebadge forthebadge forthebadge forthebadge


📺 Live Demo

Code Sandbox: Link


🛠 Install

npm i @vuesimple/vs-button

🚀 Usage

<template>
  <vs-button>Default</vs-button>
  <vs-button variant="primary" fill>Primary</vs-button>
</template>

<script>
  import VsButton from '@vuesimple/vs-button';

  export default {
    components: {
      VsButton,
    },
  };
</script>

🌎 CDN

<script src="https://unpkg.com/@vuesimple/vs-button@<version>/dist/vs-button.min.js"></script>
// Main/Entry file
app.use(VsButton.plugin);
<template>
  <vs-button>Default</vs-button>
  <vs-button variant="primary" fill>Primary</vs-button>
</template>

Nuxt.js

Nuxt Code Snippet

After installation,

  • Create a file /plugins/vs-button.js

    import Vue from 'vue';
    import VsButton from '@vuesimple/vs-button';
    
    Vue.component('vs-button', VsButton);
    
  • Update nuxt.config.js

    module.exports = {
      ...
      plugins: [
        { src: '~plugins/vs-button', mode: 'client' }
        ...
      ]
    }
    
  • In the page/ component

    <template>
      <vs-button>Default</vs-button>
      <vs-button variant="primary" fill>Primary</vs-button>
    </template>
    

Note

  • For older Nuxt versions, use <no-ssr>...</no-ssr> tag.
  • You can also do import VsButton from '@vuesimple/vs-button' & add in component:{VsButton} and use it within component, without globally installing in plugin folder.

⚙ Props

NameTypeDefaultDescription
variantStringdefaultType of button to be shown. (default, primary, secondary, warning, danger, success, light)
sizeStringmediumSize of button. (small, medium, large)
fillBoolean-Applies background color to button
isRoundBoolean-Applies round/pill styling
isLoadingBoolean-Will show loader and button will be disabled
disabledBoolean-Disable button
hrefString-Link/URL string
targetString-Can add _blank, _self
relString-Rel strings can be added like noreferrer, noopener

🔥 Events

NameDescription
clickEmitted when the button clicked.

📎 Slots

You can define own item markup via slots:

NameDescription
(default)Holds the button content and can contain HTML.
loaderHolds the loader component and can contain HTML/vue-component.

Keywords

vue

FAQs

Package last updated on 08 Jan 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts