Vue 3 - js functionality not working
See original GitHub issueHi,
I am using flowbite with Vue 3 and am having problems with getting javascript functionality (e.g. dropdowns, tooltips, etc.) to work.
Doesn’t matter if I try with “plain” flowbite
(npm package) or install both, flowbite
+ flowbite-vue
.
Simple flowbite js, like tooltips, just doesn’t work. No tooltip is shown…
Example code (taken from first tooltip example):
<button data-tooltip-target="tooltip-default" type="button" class="text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800">Default tooltip</button>
<div id="tooltip-default" role="tooltip" class="inline-block absolute invisible z-10 py-2 px-3 text-sm font-medium text-white bg-gray-900 rounded-lg shadow-sm opacity-0 transition-opacity duration-300 tooltip dark:bg-gray-700">
Tooltip content
<div class="tooltip-arrow" data-popper-arrow></div>
</div>
What could be the problem here?
Issue Analytics
- State:
- Created a year ago
- Comments:14 (2 by maintainers)
Top Results From Across the Web
Vue 3 use function not works - Stack Overflow
I tried to upgrade one of my apps from Vue 2 to Vue 3. Unfortunately I can't use: Vue.use() function. For example my...
Read more >5 common problems with Vue.js - Medium
5 common problems with Vue.js · 1. Why is “this” undefined? · 2. Make VueJS and jQuery play nice · 3. Update parent...
Read more >Reactivity Fundamentals - Vue.js
Vue will call the function when creating a new component instance, and wrap the ... In Vue 3, data is made reactive by...
Read more >Creating a Project | Vue CLI
If you are on Windows using Git Bash with minTTY, the interactive prompts will not work. You must launch the command as winpty...
Read more >Components Basics - Vue.js
When not using a build step, a Vue component can be defined as a plain JavaScript ... To solve this problem, components provide...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Answered a similar question here https://github.com/themesberg/flowbite/issues/231#issuecomment-1332420474
Maybe someone will help
Hi, I got the same issue with
Modal
component. The demo code on https://flowbite-vue.com/components/modal/modal.html doesn’t pop up any modal, however forcing it by usingModal
fromflowbite
able to show the modal but interactions (modal close, and action) still broken.I am using
flowbite@1.5.0
,flowbite-vue@^0.0.6
onvue@^3.2.41
andvite
. Did I missed something here? Also, I tried to check theflowbite-vue
source onnode_modules
(bundled) it seem did not match with the current source code:Here,
div
does not haveid
and nohidden
inclassList
: https://github.com/themesberg/flowbite-vue/blob/c658c323cd93fb2c7a17de7f23601dd9900d89b8/src/components/Modal/Modal.vue#L4-L7But on the bundled source code, it appends
id
defaultModal
andhidden
class:Bundled
Demo: https://www.youtube.com/watch?v=V4q9M7iaYEY
Thanks.