1.1.1 • Published 1 year ago

vue-spoiler v1.1.1

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

🚀 Features

  • 🎪 Demo & Playground

  • 🕶 Seamless migration: Works for both Vue 3 and 2

  • 🦾 Type Strong: Written in TypeScript

  • 🔋 SSR Friendly: Nuxt, Vitepress are supported

  • 🔩 Easy to use: Just import the component, pass in the content you want to hide and voila, you are good to go!

📦 Install

npm  i  vue-spoiler

🦄 Usage

<script  setup  lang="ts">
import { Spoiler } from  "vue-spoiler";
</script>
<template>

// Hide your text content
<Spoiler>Your  text  to  hide</Spoiler>

// Hide your elements/ component
<Spoiler>
	<YourComponent />
</Spoiler>
</template>

API

Props

PropsTypeDefaultRequiredDescription
tagBackgroundColorstring#131313noBackground color of hidden state
tagTextColorstringtransparentnoText color of hidden state
tooltipTextstringClick to revealnoTooltip shown on hover
hoverModebooleanfalsenoChange to hover to show content mode

###Events

EventsDescriptions
(reveal)Fired when content is clicked (hoverMode false) or when content is hovered/unhovered

License

MIT © trungnd19

1.1.1

1 year ago

1.1.0

1 year ago

1.0.0

1 year ago

0.0.1

1 year ago