Note: This site is currently "Under construction". I'm migrating to a new version of my site building software. Lots of things are in a state of disrepair as a result (for example, footnote links aren't working). It's all part of the process of building in public. Most things should still be readable though.

Install Tailwind-Elements

After setting up the basic tailwind install (TKTKTKT - details on tailwind install)

Code

npm install tw-elements

Add these to tailwind.config.js

Code

module.exports = {
  content: ['./node_modules/tw-elements/dist/js/**/*.js'],
  plugins: [
    require('tw-elements/dist/plugin')
  ]
}

Copy the index.min.js file to where you can get to it:

from the site root:

Code

cp node_modules/tw-elements/dist/js/index.min.js public/

On the page:

Code

import Script from 'next/script'

return (
<>
<Script src="/index.min.js" />
<div>other page stuff</div>
</>
)