I want to install Quasar to my existing Nuxt project. I've been reading through the quasar docs and the only thing they mentioned in the installation page is their own CLI which has no option for Nuxt. I also came across the nuxt-quasar module but it not maintained anymore. Has anyone have any experience with this?
-
1Yes, I'm still figuring things out but you led me to the right path – Ryan Garde May 21 '21 at 02:55
5 Answers
If it's Vue compatible then it's Nuxt compatible. Period. No idea what the accepted answer is talking about it being cumbersome, it's the same process as you do for any other framework, basically identical to what you do with e.g. Vuetify. Non-standard for Quasar, sure, but it's Vue compatible, there's nothing particularly cumbersome or difficult about it.
Here's how you do it in Nuxt 3. Slightly different for Nuxt 2 where you import Vue in order to .use
something, I made it for Nuxt 3 to be more future proof.
From https://quasar.dev/start/umd. Just do the same things they do there, but in a Nuxt manner. First they get styles and fonts in the head. Then they get the scripts. Then they register Quasar in Vue. Lets do that now!
// plugins/quasar.js
import 'quasar/dist/quasar.prod.css'
import Quasar from 'quasar/dist/quasar.umd.prod';
export default defineNuxtPlugin((nuxtApp) => {
nuxtApp.vueApp.use(Quasar, {
config: {
// options
}
})
})
// nuxt.config.js
{
plugins: [
'~/plugins/quasar.js'
]
}
Done! Now we can use it like this:
<q-page-container>
<q-page>
<h1>Hello World!</h1>
</q-page>
</q-page-container>

- 3,265
- 3
- 24
- 44
-
Cumbersome in the way that it's not really meant for such purpose. You can of course include a Remix app inside of a Nuxt one too for sure. Having 2 meta frameworks working at the same time is probably not the best approach, this is all I meant. Especially since it's an UMD build and not an ESM one. Also, context is important: I wrote my answer 13 months ago, things have maybe moved from that time. Still, I would not import the whole style + JS in that manner anyway, even if it's doable. – kissu Jun 14 '22 at 13:13
-
Also, `nuxtApp.vueApp.use` is a Nuxt3 only thing. Here, OP asked the question with a regular `nuxt.js` tag (especially regarding the time). So, your answer is not accurate for his use case. – kissu Jun 14 '22 at 22:37
-
The `nuxt.js` tag is for Nuxt, it's not version specific. The OP asked for how to do it in Nuxt never specifying which verison. It's 100% accurate for the question asked. If he wants it for Nuxt 2 I also gave instructions regarding which changes would have to be made, which is literally the same instructions for any regular plugin in Nuxt, which I guarantee he's familiar with how to do, adding an example for Nuxt 3 is more relevant today, regardless of whether your answer was from 13 months ago or not. – Simon Hyll Jun 15 '22 at 15:54
-
As with everything, you don't specify a major version initially. Hence we don't have a Nuxt v2 tag here (not really useful IMO). Also, given the context, Nuxt3 was not RC-released yet at that date hence why I answered with a Nuxt2 target in mind. I do agree on it being future-proof for sure! Meanwhile, I'm not sure about the assumption that anybody knows how to write that in a v2 syntax, an edit with the proper code would be highly welcome. I already did that to some of my answers (provide answes for both versions). Finally, even if your solution works I would still not recommend it (perf). – kissu Jun 15 '22 at 16:13
-
2I think the OP wanted to use Quasar for components and not the CLI and framework itself and so this answer addresses that. – TwoFingerRightClick Jan 09 '23 at 20:26
-
1@TwoFingerRightClick no point into using quasar, material UI (through Vuetify for example) is enough for just components. – kissu Jan 09 '23 at 20:51
-
2@kissu you can't seriously be suggesting that he swaps Quasar with Vuetify because of that line of reasoning... He needs a UI framework, both frameworks do the job he wants them to do, in nearly an identical manner, if he wants to use Quasar why shouldn't he? Because there's another framework that can also do it? That's not how any of this works and you know it – Simon Hyll Jan 29 '23 at 19:23
-
@SimonHyll apparently it's not clear enough so I will explain it in an even simpler manner with a representative example of both Quasar and Nuxt. Nuxt is a meta-framework, being able to offer you Bacon burgers, chicken burgers, and fries, like Mcdonald's. Quasar is a meta-framework too, so like BurgerKing, perfect for Bacon burgers, wraps, and chicken burgers. Now, if you are at McD and you want a chicken burger, what do you do? Do you order it there (at McDo/Nuxt)? Or do you **BUILD** a BurgerK/Quasar building **INSIDE** of McDo/Nuxt? Both can deliver materials UI components. – kissu Jan 29 '23 at 21:52
-
@SimonHyll it's like saying: "Oh, I'm using Nuxt as of right now but I need **axios** for my HTTP calls. I need to Install NextJS (React's most popular meta-framework) for that purpose". No. You install axios and wire it to Nuxt, no need to bring something totally unrelated, overkill, and slow down your web app. There are tools for specific use cases, using 10% of them to fill a gap is not a proper way of thinking. Install just what you need. Need a UI framework? Install the UI framework and not a huge monster with 50 features, 1 feature of those 50 being a UI framework. Seems reasonable to me – kissu Jan 29 '23 at 21:55
-
1@kissu The problem with that example is that when you install something like Quasar, React, NextJS or whatever meta-framework you want, that doesn't mean you actually in the end use everything those frameworks offer. You can use just a subset of what they offer. By doing so it's easier later if you decide to use more things to extend your current toolbox with a framework you've already set up. If I like the burgers at Burger King but prefer the drinks at McD, I can install both and get just the parts I want. There's nothing overkill here because I'm not buying everything they offer from both. – Simon Hyll Jan 29 '23 at 21:59
-
@SimonHyll this is a quite naive way of thinking because this is not how it is, unfortunately. You cannot code-split everything, especially the configuration files etc, it's not meant for such a purpose. Try it yourself and check the final bundle size, you'll be fixed quickly. Still, having both frameworks used is redundant and useless from a cognitive load aspect + performance + configuration complexity. Also, those considerations should not be: "Eh, whatever will happen in the long run" kind of thinking but well-thought from the beginning. As for the example, it's actually not like you can – kissu Jan 29 '23 at 22:19
-
@SimonHyll only take the drinks from McD because their building will take 200 square meters in your current BurgerK building. That one is not optional. Also, why even bother paying the BurgerK tax, while you have a Lawson next door to buy your drink (`npm` is not a huge hard thing that you need to reach for, `npm i vuetify` is quite fast to type overall). So yeah, it is overkill because it's kinda asking your kid to get some parts from McD and BurgerK and can lead to confusion. While, bringing your own drink and ordering a burger is far simpler than a mental load, again. – kissu Jan 29 '23 at 22:21
-
@SimonHyll even doing a major migration is usually a pain and can be quite complex if your app is somewhat complex. I've been there, and it's quite hardcore even for somebody who daily used Nuxt. Mixing both? That would be quite a pain that you inflict on yourself and on which one you will spend countless hours trying to have both working down the road with dependencies, conflicts, and opinionated ways of thinking from 2 developer groups. JS world is rough and it's not all pink, plugging various pieces together without **heavy** maintenance down the road. Don't make it complex from the start. – kissu Jan 29 '23 at 22:24
-
Haven't read this wall of text, but fortunately there is a great plugin here that integrates Quasar with Nuxt: https://github.com/Maiquu/nuxt-quasar – Jason Landbridge Mar 25 '23 at 10:49
-
@JasonLandbridge this wall is quite unrelated to your answer tho. And everybody sees it but thanks for your input anyway. – kissu Mar 25 '23 at 16:18
-
@JasonLandbridge just ignore him, I've tried talking sense with him, he learned programming sometime during early 2000 and is convinced that's how things still work – Simon Hyll Mar 27 '23 at 01:59
-
@SimonHyll not sure if you or Jason didn't read the thread here. Quite a troll sir. Whatever. I guess you drink sparkling water btw (if we're on the page of making some random assumptions out of the blue). – kissu Mar 27 '23 at 02:46
-
1@SimonHyll yeah fully agree, I've seen him ranting on way too many questions always spouting the same nonsense. It's like he HAS to say something even though it has nothing to do with answering the question. I opted to ignore him too and hopefully help others find a way to solve their Nuxt-quasar related questions. – Jason Landbridge Mar 27 '23 at 10:17
-
@JasonLandbridge got an example of such questions sir? I'm eager to see what I can improve here tbh. Usually, my feedback is not totally unrelated AFAIK. There are also (unfortunately) some rules on Stackoverflow that you have to comply with. – kissu Mar 27 '23 at 11:21
Current answer
⚠️⚠️⚠️⚠️⚠️
Just don't do that, you will shoot yourself in the foot down the road, use the appropriate tool for the right purpose and keep it simple so that you can have something simple to debug, easily maintainable and performant.
More details on my thinking here (same page actually, just in a comment).
⚠️⚠️⚠️⚠️⚠️
Old answer
You can either following this github issue: https://github.com/NickHurst/nuxt-quasar/issues/15
Either ask on their forum: https://forum.quasar-framework.org/
But it looks like that Quasar is not actually aimed towards an integration inside of Nuxt because it's doing it's own thing.
You also could create a Vue app, add Quasar and then migrate it to Nuxt. Cumbersome but doable IMO. But one thing is sure, this is not a common usage looking at the non-existence of this use-case.
You can maybe also ask
Bence Szalai: https://github.com/NickHurst/nuxt-quasar/issues/7#issuecomment-683255301
His twitter DMs are open.
Lastly, you can still try the Nuxt module and see how it goes. There are maybe not a lot of updates on the project. Or the CDN way but yeah...CDN.
Anyway, I don't see the point of it since it's doing pretty much what Nuxt is doing.
You could just use the components via Vuetify if this is what you're looking for.

- 40,416
- 14
- 65
- 133
-
Down voted. I have a project in production for years now running nuxt2 and vuetify but don’t like discouraging people not to use other ui framework. – bob Feb 12 '23 at 18:31
-
1@bob Vue2 will be EOL by the end of the year, so I recommend that you actually update towards Nuxt3. Otherwise, I never told something negative about using Nuxt + Vuetify (quite the opposite tbh). Meanwhile, I totally do not recommend Nuxt + Quasar for the sole purpose of being able to use Vuetify indeed. So I'm not sure where am I discouraging people to use a UI framework here. – kissu Feb 13 '23 at 09:15
-
1Actually, after reading the issue here -> https://github.com/quasarframework/quasar/issues/11165 @kissu is correct! Quasar does it's own thing when it comes to SSR so its components will not work with Nuxt! – Roland Jun 01 '23 at 17:48
For those coming here, a great plugin Nuxt-Quasar is available which combines the power of Nuxt with all the components and plugins of Quasar!

- 968
- 12
- 17
-
Link-only answers are not viable, unfortunately. Please try to add more information (like a few steps on how to set it up) at least. – kissu Mar 25 '23 at 16:19
Quasar and Nuxt do not play well together!
Top reasons to not choose Quasar with Nuxt:
If you read Quasar's docs, it says that SSR builds are supported ONLY through Quasar CLI. So if you plan to use Quasar in Nuxt, most probably you will encounter hydration errors.
If you plan to build an SPA with Nuxt though, without any kind of SSR or static pages, it will probably work fine.
The Creator of Quasar clearly stated here that Nuxt is not currently on the radar and if you see the Roadmap still (at the time of writing this) there is not anything about Nuxt.
If you are still not convinced and you want to try Quasar in Nuxt, the best option is to use an unofficial module built in a very brilliant way: Quasar module

- 24,554
- 4
- 99
- 97
Just move your project to Nuxt-quasar boilerplate. clone the boilerplate from: https://github.com/piscis/nuxt-quasar-boilerplate

- 21
- 1
- 3