Extension.js offers support for using shadcn/ui, a component library that works seamlessly with Tailwind CSS to build user interfaces with minimal setup.
The easiest way to get started with shadcn/ui in Extension.js is by integrating it directly into your extension project, alongside Tailwind CSS. This allows you to take advantage of ready-to-use components while leveraging the utility-first CSS approach of Tailwind.
To install shadcn/ui and its required dependencies, run:
Once installed, make sure you configure Tailwind and shadcn/ui properly. Add tailwindcss
and shadcn/ui to your Tailwind configuration file:
shadcn/ui components are fully customizable through Tailwind classes. To use shadcn/ui components in your extension, simply import the components you need and style them with Tailwind classes.
For content_scripts, dynamically import the global CSS file: