Vue setup
pnpm add vue tailwindcss @nightwire/css @nightwire/tailwind @nightwire/vueIn the stylesheet processed by your Tailwind CSS v4 integration:
@import 'tailwindcss';@import '@nightwire/tailwind';@import '@nightwire/vue/tailwind.css';The last import registers the installed component bundle with Tailwind’s class scanner. Vue components use Tailwind utilities and do not require the plain CSS component classes.
Scope the provider
Section titled “Scope the provider”NwProvider gives its descendants a flavor, accent, direction, locale, and tooltip and toast context. Set v-model:flavor or v-model:accent to drive the theme from app state. When omitted, the values come from the parent provider or the document. Teleported overlays still read the nearest provider.
<script setup lang="ts">import { NwButton, NwFlavorSelect, NwProvider, type FlavorName } from '@nightwire/vue'import { ref } from 'vue'
const flavor = ref<FlavorName>('nocturne')</script>
<template> <NwProvider v-model:flavor="flavor" accent="indigo"> <NwFlavorSelect v-model="flavor" /> <NwButton intent="primary" variant="solid" size="md" cut>Connect</NwButton> </NwProvider></template>For notifications, render one NwToaster per provider and call useToast().add() inside it.
Continue to live Vue components to try the controls.