Skip to content

Vue components built for Nuxt3|Vue3 powered by Windi CSS|tailwindcss

Notifications You must be signed in to change notification settings

fumeapp/tailvue

Folders and files

NameName
Last commit message
Last commit date

Latest commit

2bb4a6b Β· Feb 14, 2024
Nov 20, 2021
May 30, 2023
May 30, 2023
Jul 17, 2023
Nov 16, 2021
Nov 12, 2021
Nov 15, 2021
Feb 10, 2024
May 30, 2023
Nov 16, 2021
Apr 12, 2022

Repository files navigation

tailvue
Vue components built for Vue3 powered by Uno CSS or tailwindcss

πŸš€ Features

  • πŸŒ” All components and classes include dark-mode support
  • πŸ”Œ Programmatic toasts

toasts

$toast.show('this is a test');

toasts-single-action

$toast.show({
  type: 'danger',
  message: 'single action toast',
  timeout: 6,
  primary: {
    label: 'UNDO',
    action: () => $toast.show('you clicked UNDO')
  }
})
  • πŸ”Œ Programmatic modals

modals

$modal.show({
  type: 'danger',
  title: 'This is the title property',
  body: 'This is the body property.',
  primary: {
    label: 'Primary Action',
    theme: 'red',
    action: () => $toast.show('Primary Button clicked'),
  },
  secondary: {
    label: 'Secondary Action',
    theme: 'white',
    action: () => $toast.show('Clicked Secondary'),
  },
})
  • πŸŽͺ Interactive playground! - just run yarn; yarn dev

playground

  • ✨ Tons of other components that will be documented shortly!

Installation

NuxtJS v3

yarn add --dev @tailvue/nuxt
  • Add this to your nuxt.config.ts
modules: [
    // ...
    '@tailvue/nuxt',
],

Note If you are using Nuxt 2 you may need to put this in of the buildModules array

Vue3

yarn add tailvue
import { useToast, useModal } from 'tailvue'
const $toast = useToast()
const $modal = useModal()

Icons

yarn add --dev @iconify/vue

UnoCSS

  • Install UnoCSS
  • No include is needed for uno, we have added @unocss/include to our generated files

tailwindcss

  • Install tailwindcss
  • Add the following to your tailwind.config.js
module.exports = {
  content: [
    ...
      "node_modules/tailvue/dist/tailvue.es.js",
  ],
}