README
This requires Nuxt.js with the Tailwind CSS module
Quick Setup
- Add the
nuxt-tailvue
dependency to your Nuxt.js project
npm install nuxt-tailvue
# OR
yarn add nuxt-tailvue
- Add
nuxt-tailvue
to themodules
section ofnuxt.config.js
{
modules: [
['nuxt-tailvue', {modal: true}],
]
}
- If you're using Purge, add this module to the content section of
tailwind.config.js
module.exports = {
content: [
'node_modules/tv-*/dist/tv-*.umd.min.js',
}
Usage
this.$modal.show({
type: 'danger',
title: 'This is the title property',
body: 'This is the body property. Lorem ipsum, dolor sit amet consectetur adipisicing elit. Eius aliquam laudantium explicabo pariatur iste dolorem animi vitae error totam.',
primary: {
label: 'Primary Action',
theme: 'red',
action: () => this.$toast.success('Primary Button clicked'),
},
secondary: {
label: 'Secondary Button',
theme: 'white',
action: () => this.$toast.info('Clicked Secondary'),
},
})
Options
String type
- Optional, Default: info
- Acceptable: success, info, danger, warning
String title
- Optional, Default: false
String body
- Required
Object primary
- Optional, Default: false
- Example: { label: 'Button Face', theme: 'indigo-light', action: () => console.log('clicked') }
Object secondary
- Optional, Default: false
- Example: { label: 'Button Face', theme: 'indigo-light', action: () => console.log('clicked') }