Nuxt 3 Awesome Starter
a Nuxt 3 starter template or boilerplate with a lot of useful features. and integrated with TailwindCSS 3.
Features
-
π¨ Tailwind CSS v3 -
β¨ Headless UI -
π Icon Pack Component (unplugin-icons) -
πΉ State & Store Management (Pinia) -
π Switch Theme (light, dark, system, realtime) -
πͺ Built-in Component & Layout - Localization
- Lint & Prettier
. | . |
---|---|
![]() |
![]() |
Demo
WARNING
Nuxt 3 is still in beta and is not recommended for production use.
Built-in Components
- Footer
- Button
- Anchor (link)
- Navbar
- Navbar Builder
- Drawer (on mobile)
- Options (on mobile)
- Action Sheet
- Theme Toggle / Switcher
- Page Layout
- Wrapper
- Header
- Title
- Body
- Section
- Dashboard Layout
- Sidebar
- Modal
- Alert
Notes
Styles
Tailwindcss import in :
/path/to/assets/sass/vendor.scss
and you can add custom styles in :
/path/to/assets/sass/app.scss
Theme (Dark Mode)
ThemeManager is a plugin that allows you to switch between themes. this lib in :
/path/to/utils/theme.ts
Thememanager
is a function-class construct when app.vue before mounted. theme construct inside AppSetup()
in /path/to/app.vue
:
<script lang="ts" setup>
import { AppSetup } from '~/utils/app';
// app setup
AppSetup()
script>
To change theme, you can direct set theme from state theme.setting
, example :
<script lang="ts" setup> import { IThemeSettingOptions } from '~/utils/theme' const themeSetting = useState<IThemeSettingOptions>('theme.setting') themeSetting.value = 'dark' script>
When you change state theme.setting
, it will automatically change theme.
Theme Setting have 4 options :
light
dark
system
(operating system theme)realtime
(realtime theme, if 05:00 - 17:00, it will change to light theme, otherwise dark)
Icons
This project using unplugin-icons for auto generate and import icon as component.
You can see collection icon list in : https://icones.js.org/
you can use
or
.
in this project, configuration prefix as a "icon", you can see in nuxt.config.ts
:
export default defineNuxtConfig({
...
vite: {
plugins: [
ViteComponents({
dts: true,
resolvers: [
IconsResolver({
prefix: 'Icon',
}),
],
}),
],
},
...
})
Example :
// use icon from collection "Unicons" and name icon is "sun"// use icon from collection "Simple Icons" and name icon is "nuxtdotjs" <IconSimpleIcons:nuxtdotjs /> // use icon from collection "Unicons" and name icon is "sun" <IconUil:sun />
Quick Start
- Clone this project to your computer
git clone https://github.com/viandwi24/nuxt3-awesome-starter
- Install dependencies
npm install
- Run
npm run dev
to start development server and openhttp://localhost:3000
in your browser - Run
npm run build
to build project andnpm run start
to start production server
Checkout the deployment documentation.
License
This project is licensed under the MIT license, Copyright (c) 2022 Alfian Dwi Nugraha. For more information see the LICENSE file.
Vue Router and intlify Warning
this is realy awesome starter for nuxt3 but I am getting Vue Router and intlify Warning etc:
Vscode bug on pages
On pages inside a subfolder of pages folder (example: pages/post/index.vue) I have a bug with VScode: it says composables functions are not defined, and an error with the import, see the image below:
Do you have the same problem? It's a problem I have with my project too, and I didn't find a fix :/
Where can i remove this startup animation
Because I will like to speed up my DX, so i will like to remove this animation but I can't find where is the code, even I empty entire APP.vue still the same
Why slut?
Please explain the naming being slut.vue.
I mean, Github starting using
main
instead ofmaster
coz of the whole slave-master thing despite the context being to computers. This a whole another level.π 3 Variable Problems
π nice to again meet you π
βFirst Problem const to = toRef(props, 'to') in Anchor.vue const to = props.to in Button.vue π what is best way to get value from props?
βSecond Problem const props = defineProps({ type: { type: String, default: 'primary' }, title: { type: String, default: undefined }, text: { type: String, default: undefined } }) in Alert.vue πwhy do you use default = undefined insteadof string empty?
βThird Problem CardTitle.vue
why do you use tag with {{ text }} ?
I checked that it don't need
right?
Template is unlicensed
Hi there,
I would love to use this template for my website. Unfortunately, there is no license. Would you be so kind and add one :)
Thank you in advance
How move Global CSS from style tag to css file,
build: { extractCSS: true }
it's not work !!!!!!!!!!!!!
https://nuxt3-awesome-starter.vercel.app/ I see is some css inside the style tag on the page
.husky/pre-commit: line 4: yarn: command not found husky - pre-commit hook exited with code 127 (error) husky - command not found in PATH=/Applications/GitHub Desktop.app/Contents/Resources/app/git/libexec/git-core:/usr/bin:/bin:/usr/sbin:/sbin
I have cloned the repository, and made some changes. When I tried to commit, this error appear:
.husky/pre-commit: line 4: yarn: command not found husky - pre-commit hook exited with code 127 (error) husky - command not found in PATH=/Applications/GitHub Desktop.app/Contents/Resources/app/git/libexec/git-core:/usr/bin:/bin:/usr/sbin:/sbin
I have done all sorts of stuff, but error consists.. Please kindly help me.. https://dev.to/studiospindle/using-husky-s-pre-commit-hook-with-a-gui-21ch https://stackoverflow.com/questions/67063993/sh-husky-command-not-found
Question about some components like PageWrapper
I'm looking at the templates you have in your .vue files and I'm seeing things like PageWrapper and PageBody PageSection PageHeader... where exactly are these things coming from? I can't find any references to them other than their uses.
Cannot find package 'c12' imported from
after installing node modules i got this error ERROR Cannot start nuxt: Cannot find package 'c12' imported from C:\Users\Moham\Desktop\Git Repos\my-nuxt3-app\node_modules\nuxt-windicss\[email protected]\kit\dist\index.mjs
How to fix bug
When I run
yarn dev
, the project is running but there are some bugs.How to fix them?
how to disable preflight in this project?
I'm new to tailwind and I came across the default style removal from html elements. I found in the documentation how to disable it, but it doesn't work.
Here the code I put in my project based on yours.

pnpm dev error
pnpm install
ERROR Failed to resolve import "ufo" from "virtual:nuxt:/home/juno/Downloads/nuxt3-awesome-starter/.nuxt/paths.mjs". Does the file exist? 03:20:57
ERROR Failed to resolve import "defu" from ".nuxt/app.config.mjs". Does the file exist? 03:21:00
β Nitro built in 1938 ms
500 [vite-node] Failed to load ufo
at ViteNodeRunner.directRequest (./node_modules/.pnpm/[email protected][email protected]/node_modules/vite-node/dist/client.mjs:180:13) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async ViteNodeRunner.cachedRequest (./node_modules/.pnpm/[email protected][email protected]/node_modules/vite-node/dist/client.mjs:128:12) at async request (./node_modules/.pnpm/[email protected][email protected]/node_modules/vite-node/dist/client.mjs:151:16) at async virtual:nuxt:./.nuxt/paths.mjs:1:238 at async ViteNodeRunner.directRequest (./node_modules/.pnpm/[email protected][email protected]/node_modules/vite-node/dist/client.mjs:251:5) at async ViteNodeRunner.cachedRequest (./node_modules/.pnpm/[email protected][email protected]/node_modules/vite-node/dist/client.mjs:128:12) at async request (./node_modules/.pnpm/[email protected][email protected]/node_modules/vite-node/dist/client.mjs:151:16) at async ./node_modules/.pnpm/[email protected]_3qgq5m7bqj7palvvc4uezrk4iq/node_modules/nuxt3/dist/app/entry.mjs:5:31 at async ViteNodeRunner.directRequest (./node_modules/.pnpm/[email protected][email protected]/node_modules/vite-node/dist/client.mjs:251:5)