showmore-vue
v1.0.5
Published
A reusable Vue ShowMore and Tooltip component for Vue applications.
Maintainers
Readme
ShowMore-Vue Component
A reusable Vue 3 component that provides text truncation with "Show more"/"Show less" functionality and an optional tooltip. Includes the ShowMore and Tooltip components for flexible usage in your Vue 3 applications.
www.npmjs.com/package/showmore-vue/access

Install
npm install showmore-vueUsage
import { createApp } from 'vue';
import App from './App.vue';
import { ShowMore } from 'showmore-vue';
const app = createApp(App);
app.component('ShowMore', ShowMore);
app.mount('#app');Features
- Truncate long text and expand/collapse with custom button labels
- Optional tooltip for additional information
- Customizable styles for buttons and tooltip
Props
length: Number of characters to show before truncationshowMoreEnabled: Show the "Show more" buttonshowMoreText: Custom label for the expand buttonshowLessEnabled: Show the "Show less" button after expansionshowLessText: Custom label for the collapse buttonshowMoreBtnStyle: Style object for the buttonsshowTooltip: Enable tooltip on hovertooltipHeader: Header text for the tooltiptooltipColor: Color for the tooltip
Example
See the demo/App.vue file for a full example of usage and available props.
