nb-button-hamburger
This is a hamburger button component for Vue.js 3+.
Look at the console to see the triggered event
Installation
Yarn
yarn add @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')
To use, simply call the component, in this case it will be NbButtonHamburger
or nb-button-hamburger
.
Mode 1
<template>
<NbButtonHamburger />
</template>
Preview & Playground
Select the component you want to edit/test
Loading Sandbox...
Props
Items with an (*) mean they are required
name | Value type | Default | Description |
---|---|---|---|
nbId (*) | String | Sets the id attribute to differentiate from other components | |
status | Boolean | false | Defines the button status (clicked/unclicked) |
color | String | '#ffffff' | Defines the icon color. Accepts Color name and Hex |
colorHover | String | 'yellow' | Defines the icon color on hover. Accepts Color name and Hex |
containerColor | String | '#333333' | Defines the background color. Accepts Color name and Hex |
containerColorHover | String | 'red' | Defines the background color on hover. Accepts Color name and Hex |
paddingX | Number | 3 | Defines button padding-left and padding-right. |
paddingY | Number | 3 | Defines button padding-top and padding-button. |
disabled | Boolean | false | Defines if the button is disabled |
Events
name | Return type | Description |
---|---|---|
clicked | nothing | Fired 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>
<NbButtonHamburger
:nb-id="'nb-button-hamburger-one'"
:display="'b'"
>
<template #text>
Default Text
</template>
</NbButtonHamburger>
</template>
Table of Contents