Comments (7)
This works
const {} = dynamic(import("tw-elements"), { ssr: false });
from tailwind-elements.
You need to dynamically load it.
Try something like this:
import dynamic from "next/dynamic"
dynamic(() => import("tw-elements"), { ssr: false })
from tailwind-elements.
I had this issue and the above solution worked however the element I was using then stopped working?
I am using the accordion example found at the top of this page.
I'm using "require" instead of "import" and it works just fine. I don't understand why though.
import dynamic from "next/dynamic";
dynamic(require("tw-elements"), { ssr: false });
from tailwind-elements.
I had this issue and the above solution worked however the element I was using then stopped working?
I am using the accordion example found at the top of this page.
from tailwind-elements.
This works
const {} = dynamic(import("tw-elements"), { ssr: false });
I almost giveup using tw-elements until i got your comment.
Thankyou so muchπ€©ππ»
from tailwind-elements.
Hi, we just have launched bunch of integration tutorials - both with CSR and SSR frameworks. If you have more questions about integration or you still got some problems with particular components, let us know by adding new issue / topic in discussions section (if there are some unclear informations or just want let us know about something).
from tailwind-elements.
I still get this error. I've been through the Next.js integration tutorial and its not massively helpful. I don't think the _app.js file is made by default. Even with the above I get "initTE' is not exported from tw-elements. I find that the tw-elements.d.ts file just contains 'declare module "tw-elements' which is a bit odd to me?
Just created a new project to follow the Next.js integration tutorial and I get the same errors
Attempted import error: 'Datepicker' is not exported from 'tw-elements' (imported as 'Datepicker').
from tailwind-elements.
Related Issues (20)
- Charts - remove dynamic import and build charts as a different module
- Chips (Chip and ChipsInput) - fix dispose method and `add.te.chips` event
- Select/Autocomplete - fix aria-expanded value toggling
- Autocomplete - fix issues with input focus after closing the dropdown on esc
- Popconfirm - fix: way of adding event listeners, `cancel` event and dispose method
- When use tw input inside tw collapse, notch does not get updated correctly HOT 1
- Rating - add inheritance via BaseComponent and fix dispose method
- Lightbox - update image source URLs across all examples
- [Form Input Custom Classes] [data-te-class-notch-leading-valid, middle and trailing not working in Nuxt 3] HOT 2
- [FORMS - SELECT and MODAL] [NOT PROPERLY WORKING] HOT 1
- License AGPL HOT 1
- Timepicker Allow Minutes Step instead of Increment HOT 1
- Datepicker Format to allow more date formats HOT 1
- [Angular integration] [ReferenceError: document is not defined] HOT 3
- [ComponenMobile terminal navigation style problemt name] [description of the issue] HOT 3
- [Angular] - Datepicker re-initialization not wroking HOT 2
- Registration on Site - registration not taking, pw reset not working HOT 8
- v2.0 missing components HOT 4
- Pro vs Free HOT 3
- [Select] Can't attach events to select's options when there are more than 2 selects HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tailwind-elements.