nb-button-vava-game

This is a Vava (inspired by Valorant Game) button component for Vue.js 3+.

Look at the console to see the triggered event

Installation

Yarn
yarn add @vlalg-nimbus/nb-buttons
NPM
npm install @vlalg-nimbus/nb-buttons

Usage

Vue 3
import { createApp } from 'vue'
import App from './App.vue'

import NbButtonsComponents from '@vlalg-nimbus/nb-buttons'
import "@vlalg-nimbus/nb-buttons/dist/style.css";

const app = createApp(App)
app.use(NbButtonsComponents)
app.mount('#app')
Nuxt 3
import NbButtonsComponents from '@vlalg-nimbus/nb-buttons'
import "@vlalg-nimbus/nb-buttons/dist/style.css";

export default defineNuxtPlugin(context => {
  context.vueApp.use(NbButtonsComponents)
})

To use, simply call the component, in this case it will be NbButtonVavaGame or nb-button-vava-game.

Mode 1
<template>
  <NbButtonVavaGame />
</template>
Mode 2
<template>
  <nb-button-vava-game />
</template>
Mode 3
<template>
  <nb-button-vava-game></nb-button-vava-game>
</template>

Preview & Playground

Select the component you want to edit/test

Loading Sandbox...

Props

Items with an (*) mean they are required

nameValue typeDefaultDescription
nbId (*)StringSets the id attribute to differentiate from other components
displayString'b'Defines the display type. Accepts ib and b.
textColorString'#ece8e1'Defines the text color. Accepts Color name and Hex
textColorHoverString'gray'Defines the text color on hover. Accepts Color name and Hex
buttonColorString'blue'Defines the button color (background). Accepts Color name and Hex
buttonColorHoverString'cyan'Defines the button color (background) on hover. Accepts Color name and Hex
borderColorString'yellow'Defines the border color. Accepts Color name and Hex
borderOpacityNumber0.5Defines the border opacity.
paddingXBorderNumber0.3Defines border padding-left and padding-right.
paddingYBorderNumber0.3Defines border padding-top and padding-button.
paddingXContentNumber0.5Defines button content padding-left and padding-right.
paddingYContentNumber0.5Defines button content padding-top and padding-button.
uppercaseBooleantrueDefines if the button text is uppercase
disabledBooleanfalseDefines if the button is disabled
fontFamilyString"'Lato', sans-serif"Defines the font-family
fontSizeString'1.6em'Defines the font-size
fontWeightNumber400Defines the font-weight

Events

nameReturn typeDescription
clickednothingFired when the button is clicked, returns nothing.

Slot

The component has a slot called content where the content that will be manipulated must be passed. It has a default text (Default Text) in case the content does not pass through the slot.

<template>
  <NbButtonVavaGame
    :nb-id="'nb-button-vava-game-one'"
    :display="'b'"
  >
    <template #text>
      Default Text
    </template>
  </NbButtonVavaGame>
</template>