nb-zoom-text

This is a zoom text component for Vue.js 3+.

Loading component...

Installation

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

Usage

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

import NbTextComponents from '@vlalg-nimbus/nb-text'
import "@vlalg-nimbus/nb-text/dist/style.css";

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

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

To use, simply call the component, in this case it will be NbZoomText or nb-zoom-text.

Mode 1
<template>
  <NbZoomText />
</template>
Mode 2
<template>
  <nb-zoom-text />
</template>
Mode 3
<template>
  <nb-zoom-text></nb-zoom-text>
</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
titleString''Tooltip text shown when hovering over the component.
disabledBooleanfalseDefines if the zoom component is disabled
backgroundBooleanfalseDefines if the zoom has background.
backgroundColorString'#ffffff'Defines the background color. Accepts Color name and Hex
textColorString'black'Defines the text color. Accepts Color name and Hex
scaleNumber1.5Defines component scale (size). Accepts 1 to 5.
fontFamilyString"'Lato', sans-serif"Defines the font-family
fontSizeString'1.6em'Defines the font-size
fontWeightNumber400Defines the font-weight

Events

nameReturn typeDescription
clickedMouseEvent | KeyboardEventFired when the component is clicked. Receives the native DOM event as first argument.

Slot

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

<template>
  <NbZoomText>
    CONTENT HERE
  </NbZoomText>
</template>