Comments (12)
On NextJS I have fixed the issue by putting the import in a useEffect
useEffect(() => { import('tw-elements'); }, []);
from tw-elements.
Same issue...using React. You need to detail how to use it with React because the imports are not working
from tw-elements.
Same here with React. many CSS classes missing, like far
, fa-calendar
and datepicker-toggle-icon
.
I'm using Tailwind 3.0 and React 17
from tw-elements.
Yeah I'm also having problems getting started with this on NextJS using TS, getting an error from /dist/js/index.min.js
about document
not being defined
from tw-elements.
@Victoria91 @BesavedTech @FelipeEndo
- Have you installed the latest 1.0.0-alpha8 version?
- Did you add the following configuration to your tailwind.config.js file?
module.exports = {
content: ['./src/**/*.{html,js}', './node_modules/tw-elements/dist/js/**/*.js'],
plugins: [
require('tw-elements/dist/plugin')
]
}
Especially the content part with tw-elements js file is important, because some classes are added dynamically.
from tw-elements.
Can't use the time picker in react although included all of the files as described
from tw-elements.
@emorevival Where did you put this useEffect
?
from tw-elements.
@ahmetskilinc If memory serves me well I put it in my index.tsx
from tw-elements.
after a year, i still need help..
following the official guide, stuck on point 4. i don't get where TW-ELEMENTS-PATH should point to.
i'm on:
- react 18 ( without next.js nor vite )
- tailwind 3.2.7
- jsx
installed using npm, folder tw-elements is in 'node_modules' directory. so how do i point to that directory? i thought only 'src' is callable.
from tw-elements.
@wilychris ./node-modules/tw-elements/dist/js/index.min.js
. Alternatively you can import library by calling import in useEffect hook in App.jsx.
useEffect(() => {
const use = async () => {
await import("tw-elements");
};
use();
}, []);
from tw-elements.
@wilychris
./node-modules/tw-elements/dist/js/index.min.js
. Alternatively you can import library by calling import in useEffect hook in App.jsx.useEffect(() => { const use = async () => { await import("tw-elements"); }; use(); }, []);
useEffect
in App.jsx confirmed, tested, and works on windows chrome 109 and firefox 110.
many thanks @Trochonovitz
from tw-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 tw-elements.
Related Issues (20)
- 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
- Tabs with livewire 3 in laravel 11 and using wire:navigate option does not work HOT 4
- [Select] [duplication of select component when reinitializing it] 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 tw-elements.