Do not use built-in or reserved HTML elements with Vue, TailwindUI and Headless UI

I’m trying to add the TailwindUI / Headless UI Menu (dropdown) to Vue and am getting two errors in the console:

Do not use built-in or reserved HTML elements as component id: menu


Error: < MenuButton /> is missing a parent < Menu /> component

I’m Using Vue 3 within a Laravel 8 app, here’s what app.js looks like:

import { Menu, MenuButton, MenuItems, MenuItem } from "@headlessui/vue";
const app = createApp({
app.component('menu', Menu);
app.component('menubutton', MenuButton);
app.component('menuitems', MenuItems);
app.component('menuitem', MenuItem);

And here’s a minimal example for the view:
    <MenuItem v-slot="{ active }">
      <a :class='{ "bg-blue-500": active }' href="/test">

I’ve tried everything that I can think of and am lost! Any ideas?


Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.

Method 1

Do not use <Menu>-element as it is a built-in HTML element.

Just rename to something like CustomMenu

import { Menu as CustomMenu, ... } from ...
app.component('menu', CustomMenu);

All methods was sourced from or, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

0 0 votes
Article Rating
Notify of

Inline Feedbacks
View all comments
Would love your thoughts, please comment.x