+ Bun is a tool that is designed to replace Node.js in the development of
+ web applications. The main goal of Bun is to reduce the startup times and
+ memory usage of created apps. Vite works with a Bun out of the box.
+ TW Elements can be imported in Vite applications according to the
+ following procedure:
+
+
+
+
+
+ 1. Make sure to have the
+ Bun
+ installed. You can run the following command to check whether Bun is working
+ properly:
+
+ 5. Link the css file inside the output.html. We are linking the
+ output.html file instead of the style.css because
+ thats where the tailwindcss CLI is going to add the styling classes.
+
+ 7. Add js files patterns that loads dynamic component classes to the content
+ array inside the tailwind.config.js. Extend the default tailwind
+ classes by adding the TW elements plugin.
+
+ 9. Now you can start working on your app. Copy the code bellow to add a
+ carousel component to your app. Don't forget to call the
+ initTE method.
+
Some representative placeholder content for the first slide.
+
+
+
+
+
+
Second slide label
+
Some representative placeholder content for the second slide.
+
+
+
+
+
+
Third slide label
+
Some representative placeholder content for the third slide.
+
+
+
+
+
+
+
+
+
+ {{< /twsnippet/code >}}
+
+ {{< twsnippet/code lang="js" >}}
+ import { Carousel, initTE } from "tw-elements";
+ initTE({ Carousel }, true ); // set second parameter to true if you want to use a debugger
+ {{< /twsnippet/code >}}
+ {{< /twsnippet/wrapper >}}
+
+
+
+ 10. Update the scripts inside the package.json file so that the
+ development server can be started using bunx instead of
+ node. You can do the same with the build script.
+