-
Notifications
You must be signed in to change notification settings - Fork 705
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not able to set up Flowbite on SvelteKit #67
Comments
For now, this is my solution. But I hope there will be a better solution.
|
I wonder why importing But it doesn't work with SvelteKit locally. |
The above solution doesn't work for page change. Interactive tabs don't work either unless you refresh the page. Are there any better solutions? |
I requested to add Flowbite to Svelte-add. |
Hey @shinokada, Thanks for the contribution! Flowbite is a pretty new library and we're doing our best to keep up with the demand for new components and technology support. For Q2 this year we expect to launch a standalone React and Vue.js library, and we would have plans for a Svelte integration later this year. However, if someone else would pull up the sleeves to create an integration for Svelte, they would have our full support and collaboration. |
I found the work around for now. I can solve the problem by adding By default, the SvelteKit runtime intercepts clicks on elements and bypasses the normal browser navigation for relative (same-origin) URLs that match one of your page routes. We sometimes need to tell SvelteKit that certain links need to be handled by normal browser navigation. Examples of this might be linking to another page on your domain that's not part of your SvelteKit app or linking to an endpoint.
|
We now have a Flowbite Svelte library available. |
That's awesome! But, it does not work in my case. |
@codinkai If you are using SvelteKit, I recommend using Flowbite-Svelte. It has an Accordion component. |
Thank you. That does look really promising and I will definitely give it a try. Anyway, the method 1 described on https://flowbite.com/docs/getting-started/svelte/ seems not work. |
Which method are you trying? 1, 2, or 3? |
I have followed the instructions of Method 1 and created a file named "accordion.svelte" under src/routes with the contents of the first example https://flowbite.com/docs/components/accordion/. When running with "npm run dev" and accessing it at http://localhost:3000/accordion, the accordion is closed and does not work. |
Ohh, I see the examples from the flowbite website are not supposed to work. It works, when I follow the instrucions on https://flowbite-svelte.vercel.app/getting-started with the examples on https://flowbite-svelte.vercel.app/accordions/default. Very good library :) |
I can't make this work either....same problem... I followed all steps here: link |
Describe the bug
I'm trying to install Flowbite on SvelteKit.
When I run
npm run dev
, I get an error:To Reproduce
Install SvelteKit:
Install Tailwind Css and Flowbite:
Update the TailwindCSS config.
In the tailwind.config.cjs file:
Adding flowbite to
routes/__layout.svelte
:Expected behavior
No error.
Screenshots
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: