@@ -6,7 +6,7 @@ import { addTemplate, addTypeTemplate, hasNuxtModule, logger, updateTemplates, g
66import type { Nuxt, NuxtTemplate, NuxtTypeTemplate } from '@nuxt/schema'
77import type { Resolver } from '@nuxt/kit'
88import type { ModuleOptions } from './module'
9-import { applyDefaultVariants, applyPrefixToObject } from './utils/theme'
9+import { applyDefaultVariants, applyPrefixToObject, applyUnstyled } from './utils/theme'
1010import { detectUsedComponents } from './utils/components'
1111import * as theme from './theme'
1212import * as themeProse from './theme/prose'
@@ -32,6 +32,8 @@ export function getTemplates(options: ModuleOptions, uiConfig: Record<string, an
32323333// Override default variants from nuxt.config.ts
3434result = applyDefaultVariants(result, options.theme?.defaultVariants)
35+// Strip default theme classes if `unstyled` is enabled
36+result = applyUnstyled(result, options.theme?.unstyled)
3537// Apply Tailwind prefix if configured
3638result = applyPrefixToObject(result, options.theme?.prefix)
3739@@ -65,14 +67,16 @@ export function getTemplates(options: ModuleOptions, uiConfig: Record<string, an
6567const themeUtilsPath = fileURLToPath(new URL('./utils/theme', import.meta.url))
6668const defaultVariantsJson = JSON.stringify(options.theme?.defaultVariants) ?? 'undefined'
6769const prefixJson = JSON.stringify(options.theme?.prefix) ?? 'undefined'
70+const unstyledJson = JSON.stringify(options.theme?.unstyled) ?? 'undefined'
68716972return [
7073`import template from ${JSON.stringify(templatePath)}`,
71-`import { applyDefaultVariants, applyPrefixToObject } from ${JSON.stringify(themeUtilsPath)}`,
74+`import { applyDefaultVariants, applyPrefixToObject, applyUnstyled } from ${JSON.stringify(themeUtilsPath)}`,
7275 ...generateVariantDeclarations(variants),
7376`const options = ${JSON.stringify(options, null, 2)}`,
7477`let result = typeof template === 'function' ? (template as Function)(options) : template`,
7578`result = applyDefaultVariants(result, ${defaultVariantsJson})`,
79+`result = applyUnstyled(result, ${unstyledJson})`,
7680`result = applyPrefixToObject(result, ${prefixJson})`,
7781`const theme = ${json}`,
7882`export default result as typeof theme`