nb-highlight-selected-text
This is a highlight selected text component for Vue.js 3+.
Select " " to see it in another color
Installation
Yarn
yarn add @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')
To use, simply call the component, in this case it will be NbHighlightSelectedText or nb-highlight-selected-text.
Mode 1
<template>
  <NbHighlightSelectedText />
</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 | |
| backgroundColor | String | '#000000' | Defines the background color. Accepts Color name and Hex | 
| textColor | String | '#ffffff' | Defines the text color. Accepts Color name and Hex | 
Slot
The component has a slot called text 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>
  <NbHighlightSelectedText>
    <template #text>
      CONTENT HERE
    </template>
  </NbHighlightSelectedText>
</template>
Slot
The component has a slot called text 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>
  <NbHighlightSelectedText>
    <template #text>
      CONTENT HERE
    </template>
  </NbHighlightSelectedText>
</template>
Table of Contents
