diff --git a/site/content/docs/standard/integrations/angular/index.html b/site/content/docs/standard/integrations/angular/index.html
index 4ba5f176d..25f2ff293 100644
--- a/site/content/docs/standard/integrations/angular/index.html
+++ b/site/content/docs/standard/integrations/angular/index.html
@@ -166,7 +166,8 @@
Step 2
theme: {
extend: {},
},
- plugins: [require("tw-elements/dist/plugin")]
+ darkMode: "class",
+ plugins: [require("tw-elements/dist/plugin.cjs")]
}
{{< /twsnippet/code >}}
{{< /twsnippet/wrapper >}}
@@ -189,6 +190,22 @@ Step 3
{{< /twsnippet/wrapper >}}
+ Step 4
+
+ Attach the Roboto
font in index.html
.
+
+
+
+
+ {{< twsnippet/wrapper "index.html" "" "mobile" >}}
+ {{< twsnippet/code active=true lang="HTML" >}}
+
+ {{< /twsnippet/code >}}
+ {{< /twsnippet/wrapper >}}
+
+
Step 4
Install Tailwind Elements.
@@ -209,15 +226,39 @@ Step 5
- {{< twsnippet/wrapper "app.component.ts" "" "mobile" >}}
+ {{< twsnippet/wrapper "app.component.ts, app.component.html" "" "mobile" >}}
{{< twsnippet/code active=true lang="JavaScript" >}}
- import { Datepicker, Input, initTE } from "tw-elements";
-
- ngOnInit() {
- initTE({ Datepicker, Input });
- }
+ import { Component } from '@angular/core';
+ import { Carousel, Dropdown, initTE } from 'tw-elements';
+
+ @Component({
+ selector: 'app-root',
+ templateUrl: './app.component.html',
+ styleUrls: ['./app.component.css'],
+ })
+ export class AppComponent {
+ ngOnInit() {
+ initTE({ Carousel, Dropdown });
+ }
+ }
{{< /twsnippet/code >}}
- {{< /twsnippet/wrapper >}}
+ {{< twsnippet/code lang="HTML" >}}
+
+
+ Select a date
+
+ {{< /twsnippet/code >}}
+ {{< /twsnippet/wrapper >}}
@@ -240,35 +281,52 @@ Step 5
Step 1
- Import components which are you intend to use.
-
-
-
- {{< twsnippet/wrapper "app.component.ts" "" "mobile" >}}
- {{< twsnippet/code active=true lang="JavaScript" >}}
- import { Datepicker, Input } from "tw-elements";
- {{< /twsnippet/code >}}
- {{< /twsnippet/wrapper >}}
-
-
- Step 2
- Initialize components in lifecycle hook.
+
+ Import components which are you intend to use and initialize components in
+ lifecycle hook.
+
- {{< twsnippet/wrapper "app.component.ts" "" "mobile" >}}
- {{< twsnippet/code active=true lang="JavaScript" >}}
- ngOnInit() {
- const myInput = new Input(document.getElementById("myDatepicker"));
- const options = {
- format: "dd-mm-yyyy",
- };
- const myDatepicker = new Datepicker(
- document.getElementById("myDatepicker"),
- options
- );
- };
- {{< /twsnippet/code >}}
+ {{< twsnippet/wrapper "app.component.ts, app.component.html" "" "mobile" >}}
+ {{< twsnippet/code active=true lang="JavaScript" >}}
+ import { Component } from '@angular/core';
+ import { Carousel, Dropdown, initTE } from 'tw-elements';
+
+ @Component({
+ selector: 'app-root',
+ templateUrl: './app.component.html',
+ styleUrls: ['./app.component.css'],
+ })
+ export class AppComponent {
+ ngOnInit() {
+ const myInput = new Input(document.getElementById("myDatepicker"));
+ const options = {
+ format: "dd-mm-yyyy",
+ };
+ const myDatepicker = new Datepicker(
+ document.getElementById("myDatepicker"),
+ options
+ );
+ }
+ }
+ {{< /twsnippet/code >}}
+ {{< twsnippet/code lang="HTML" >}}
+
+
+ Select a date
+
+ {{< /twsnippet/code >}}
{{< /twsnippet/wrapper >}}
diff --git a/site/content/docs/standard/integrations/django/index.html b/site/content/docs/standard/integrations/django/index.html
index 21cb7d5c6..b2694c236 100644
--- a/site/content/docs/standard/integrations/django/index.html
+++ b/site/content/docs/standard/integrations/django/index.html
@@ -216,7 +216,7 @@ Step 2
extend: {},
},
darkMode: "class",
- plugins: [require("tw-elements/dist/plugin")],
+ plugins: [require("tw-elements/dist/plugin.cjs")],
};
{{< /twsnippet/code >}}
{{< /twsnippet/wrapper >}}
@@ -292,6 +292,22 @@ Step 6
Step 7
+
+ Attach the Roboto
font in home.html
.
+
+
+
+
+ {{< twsnippet/wrapper "home.html" "" "mobile" >}}
+ {{< twsnippet/code active=true lang="HTML" >}}
+
+ {{< /twsnippet/code >}}
+ {{< /twsnippet/wrapper >}}
+
+
+ Step 8
Create views.py
file in mysite
folder and put in
there render for your first / home page.
@@ -309,7 +325,7 @@
Step 7
{{< /twsnippet/wrapper >}}
- Step 8
+ Step 9
Then in urls.py
file (located in mysite
folder)
add import newly created views.py
file and attach urls for
diff --git a/site/content/docs/standard/integrations/express/index.html b/site/content/docs/standard/integrations/express/index.html
index d0de02c90..acb887afb 100644
--- a/site/content/docs/standard/integrations/express/index.html
+++ b/site/content/docs/standard/integrations/express/index.html
@@ -176,7 +176,8 @@
Step 2
"./src/**/*.{html,js,css}",
"./node_modules/tw-elements/dist/js/**/*.js",
],
- plugins: [require("tw-elements/dist/plugin")]
+ darkMode: "class",
+ plugins: [require("tw-elements/dist/plugin.cjs")]
}
{{< /twsnippet/code >}}
{{< /twsnippet/wrapper >}}
@@ -242,6 +243,22 @@ Step 6
Step 7
+
+ Attach the Roboto
font in index.ejs
.
+
+
+
+
+ {{< twsnippet/wrapper "index.html" "" "mobile" >}}
+ {{< twsnippet/code active=true lang="HTML" >}}
+
+ {{< /twsnippet/code >}}
+ {{< /twsnippet/wrapper >}}
+
+
+ Step 8
In index.ejs
file, at the end of body
link script
for Tailwind Elements JS file.
diff --git a/site/content/docs/standard/integrations/laravel/index.html b/site/content/docs/standard/integrations/laravel/index.html
index 1967db23b..2cadcc902 100644
--- a/site/content/docs/standard/integrations/laravel/index.html
+++ b/site/content/docs/standard/integrations/laravel/index.html
@@ -130,7 +130,8 @@
Step 2
theme: {
extend: {},
},
- plugins: [require("tw-elements/dist/plugin")]
+ darkMode: "class",
+ plugins: [require("tw-elements/dist/plugin.cjs")]
}
{{< /twsnippet/code >}}
{{< /twsnippet/wrapper >}}
@@ -162,8 +163,8 @@ Step 4
- {{< twsnippet/wrapper "Terminal" "" "mobile" >}}
- {{< twsnippet/code active=true lang="plaintext" type="terminal" >}}
+ {{< twsnippet/wrapper "welcome.blade.php" "" "mobile" >}}
+ {{< twsnippet/code active=true lang="HTML" >}}
@vite('resources/css/app.css')
@vite('resources/js/app.js')
{{< /twsnippet/code >}}
@@ -171,6 +172,22 @@
Step 4
Step 5
+
+ Attach the Roboto
font in welcome.blade.php
.
+
+
+
+
+ {{< twsnippet/wrapper "welcome.blade.php" "" "mobile" >}}
+ {{< twsnippet/code active=true lang="HTML" >}}
+
+ {{< /twsnippet/code >}}
+ {{< /twsnippet/wrapper >}}
+
+
+ Step 6
Install Tailwind Elements.
@@ -182,7 +199,7 @@
Step 5
{{< /twsnippet/wrapper >}}
- Step 6
+ Step 7
Import components which are you intend to use and necessary function
initTE
in app.js
file which is located in
@@ -220,12 +237,14 @@
Step 6
Step 1
- Initialize components.
+ Import and initialize components.
{{< twsnippet/wrapper "app.js" "" "mobile" >}}
{{< twsnippet/code active=true lang="JavaScript" >}}
+ import { Datepicker, Input } from "tw-elements";
+
const myInput = new Input(document.getElementById("myDatepicker"));
const options = {
format: "dd-mm-yyyy",
diff --git a/site/content/docs/standard/integrations/next/index.html b/site/content/docs/standard/integrations/next/index.html
index 475496994..7ee405d1a 100644
--- a/site/content/docs/standard/integrations/next/index.html
+++ b/site/content/docs/standard/integrations/next/index.html
@@ -134,7 +134,8 @@
Step 2
theme: {
extend: {},
},
- plugins: [require("tw-elements/dist/plugin")]
+ darkMode: "class",
+ plugins: [require("tw-elements/dist/plugin.cjs")]
}
{{< /twsnippet/code >}}
{{< /twsnippet/wrapper >}}
@@ -158,6 +159,36 @@ Step 3
Step 4
+
+ Attach the Roboto
font in _app.js
.
+
+
+
+
+ {{< twsnippet/wrapper "_app.js" "" "mobile" >}}
+ {{< twsnippet/code active=true lang="JavaScript" >}}
+ import "@/styles/globals.css";
+ import { Roboto } from "next/font/google";
+
+ const roboto = Roboto({ weight: "400", subsets: ["latin"] });
+
+ export default function App({ Component, pageProps }) {
+ return (
+ <>
+
+
+ >
+ );
+ }
+ {{< /twsnippet/code >}}
+ {{< /twsnippet/wrapper >}}
+
+
+ Step 5
Install Tailwind Elements.
@@ -169,31 +200,66 @@
Step 4
{{< /twsnippet/wrapper >}}
- Step 5
+ Step 6
- Create standalone file and import components which are you intend to use and
- necessary function
- initTE
. Initialize initTE
in a lifecycle method.
+ Import globally in _app.js
Tailiwind Elements CSS file (you could do it also in specific component which are using TE).
- {{< twsnippet/wrapper "Component.js" "" "mobile" >}}
+ {{< twsnippet/wrapper "_app.js" "" "mobile" >}}
{{< twsnippet/code active=true lang="JavaScript" >}}
- import { useEffect } from "react";
- import { Datepicker, Input, initTE } from "tw-elements";
+ import "tw-elements/dist/css/tw-elements.min.css";
+ {{< /twsnippet/code >}}
+ {{< /twsnippet/wrapper >}}
+
+
+ Step 7
+
+ Create standalone file with name of your component (for example MyDatepicker.js
in src/pages
directory) and import TE components which are you intend to use. Also include necessary function initTE
. Initialize initTE
in a lifecycle method.
+
+
+
+ {{< twsnippet/wrapper "MyDatepicker.js" "" "mobile" >}}
+ {{< twsnippet/code active=true lang="JavaScript" >}}
+ import { Datepicker, Input, initTE } from "tw-elements";
+ import { useEffect } from "react";
+
+ const MyDatepicker = () => {
useEffect(() => {
initTE({ Datepicker, Input });
}, []);
+
+ return (
+
+
+
+ Select a date
+
+
+ );
+ };
+
+ export default MyDatepicker;
{{< /twsnippet/code >}}
{{< /twsnippet/wrapper >}}
- Step 6
+ Step 8
- Import client-side component wrapping it into dynamic import with
- ssr
object set to false
.
+ Import (for example in index.js
) newly created component wrapping it into dynamic
import with ssr
object set to false
.
@@ -202,9 +268,17 @@
Step 6
{{< twsnippet/code active=true lang="JavaScript" >}}
import dynamic from "next/dynamic";
- const Component = dynamic(() => import("./component"), {
- ssr: false,
- });
+ const DynamicDatepicker = dynamic(() => import("./MyDatepicker"), { ssr: false });
+
+ const Home = () => {
+ return (
+ <>
+
+ >
+ );
+ };
+
+ export default Home;
{{< /twsnippet/code >}}
{{< /twsnippet/wrapper >}}
@@ -231,26 +305,16 @@ Step 6
Step 1
- Import components which are you intend to use.
+ Import components which are you intend to use and initialize components in lifecycle hook.
- {{< twsnippet/wrapper "Component.js" "" "mobile" >}}
+ {{< twsnippet/wrapper "MyDatepicker.js" "" "mobile" >}}
{{< twsnippet/code active=true lang="JavaScript" >}}
- import { Datepicker, Input, initTE } from "tw-elements";
- {{< /twsnippet/code >}}
- {{< /twsnippet/wrapper >}}
-
-
- Step 2
- Initialize components in lifecycle hook.
-
-
-
- {{< twsnippet/wrapper "Component.js" "" "mobile" >}}
- {{< twsnippet/code active=true lang="JavaScript" >}}
- import { useEffect } from "react";
-
+ import { Datepicker, Input } from "tw-elements";
+ import { useEffect } from "react";
+
+ const MyDatepicker = () => {
useEffect(() => {
const myInput = new Input(document.getElementById("myDatepicker"));
const options = {
@@ -261,6 +325,28 @@
Step 2
options
);
}, []);
+
+ return (
+
+
+
+ Select a date
+
+
+ );
+ };
+
+ export default MyDatepicker;
{{< /twsnippet/code >}}
{{< /twsnippet/wrapper >}}
diff --git a/site/content/docs/standard/integrations/nuxt/index.html b/site/content/docs/standard/integrations/nuxt/index.html
index 034d94def..e53e6a7f9 100644
--- a/site/content/docs/standard/integrations/nuxt/index.html
+++ b/site/content/docs/standard/integrations/nuxt/index.html
@@ -159,7 +159,8 @@ Step 3
theme: {
extend: {},
},
- plugins: [require("tw-elements/dist/plugin")]
+ darkMode: "class",
+ plugins: [require("tw-elements/dist/plugin.cjs")]
}
{{< /twsnippet/code >}}
{{< /twsnippet/wrapper >}}
@@ -182,6 +183,30 @@ Step 4
{{< /twsnippet/wrapper >}}
+ Step 5
+
+ Attach the Roboto font in nuxt.config.js/ts
by creating an
+ app
object.
+
+
+
+
+ {{< twsnippet/wrapper "nuxt.config.js" "" "mobile" >}}
+ {{< twsnippet/code active=true lang="JavaScript" >}}
+ app: {
+ head: {
+ link: [
+ {
+ rel: "stylesheet",
+ href: "https://fonts.googleapis.com/css?family=Roboto:300,400,500,700,900&display=swap",
+ },
+ ],
+ },
+ },
+ {{< /twsnippet/code >}}
+ {{< /twsnippet/wrapper >}}
+
+
Step 5
Install Tailwind Elements.
@@ -196,15 +221,50 @@ Step 5
Step 6
- Create standalone file and import components which are you intend to use and
- necessary function
- initTE
. Initialize initTE
in a lifecycle method.
+ Import globally in app.vue
Tailiwind Elements CSS file (you
+ could do it also in specific component which are using TE).
- {{< twsnippet/wrapper "Component.vue" "" "mobile" >}}
+ {{< twsnippet/wrapper "app.vue" "" "mobile" >}}
{{< twsnippet/code active=true lang="JavaScript" >}}
+ import "tw-elements/dist/css/tw-elements.min.css";
+ {{< /twsnippet/code >}}
+ {{< /twsnippet/wrapper >}}
+
+
+ Step 7
+
+ Create standalone file with name of your component (for example
+ Datepicker.vue
in src/components
directory) and
+ import TE components which are you intend to use. Also include necessary
+ function initTE
. Initialize initTE
in a lifecycle
+ method.
+
+
+
+
+ {{< twsnippet/wrapper "template, script" "" "mobile" >}}
+ {{< twsnippet/code active=true lang="HTML" >}}
+
+
+
+ Select a date
+
+
+ {{< /twsnippet/code >}}
+ {{< twsnippet/code lang="HTML" >}}
-
+ {{< twsnippet/wrapper "template, script" "" "mobile" >}}
+ {{< twsnippet/code active=true lang="HTML" >}}
-
+
{{< /twsnippet/code >}}
+ {{< twsnippet/code lang="HTML" >}}
+
+ {{< /twsnippet/code >}}
{{< /twsnippet/wrapper >}}
@@ -262,37 +323,46 @@ Step 7
Step 1
- Import components which are you intend to use.
+
+ Import components which are you intend to use and initialize them in
+ lifecycle method.
+
- {{< twsnippet/wrapper "App.vue" "" "mobile" >}}
- {{< twsnippet/code active=true lang="JavaScript" >}}
- import { Datepicker, Input, initTE } from "tw-elements";
- {{< /twsnippet/code >}}
- {{< /twsnippet/wrapper >}}
-
-
- Step 2
- Initialize components in lifecycle hook.
+ {{< twsnippet/wrapper "template, script" "" "mobile" >}}
+ {{< twsnippet/code active=true lang="HTML" >}}
+
+
+
+ Select a date
+
+
+ {{< /twsnippet/code >}}
+ {{< twsnippet/code lang="HTML" >}}
+
+ {{< /twsnippet/code >}}
{{< /twsnippet/wrapper >}}
diff --git a/site/content/docs/standard/integrations/react/index.html b/site/content/docs/standard/integrations/react/index.html
index 11738d49b..36bc06711 100644
--- a/site/content/docs/standard/integrations/react/index.html
+++ b/site/content/docs/standard/integrations/react/index.html
@@ -155,7 +155,8 @@ Step 2
theme: {
extend: {},
},
- plugins: [require("tw-elements/dist/plugin")]
+ darkMode: "class",
+ plugins: [require("tw-elements/dist/plugin.cjs")]
}
{{< /twsnippet/code >}}
{{< /twsnippet/wrapper >}}
@@ -179,6 +180,22 @@ Step 3
Step 4
+
+ Attach the Roboto
font in index.html
.
+
+
+
+
+ {{< twsnippet/wrapper "index.html" "" "mobile" >}}
+ {{< twsnippet/code active=true lang="HTML" >}}
+
+ {{< /twsnippet/code >}}
+ {{< /twsnippet/wrapper >}}
+
+
+ Step 5
Install Tailwind Elements.
@@ -190,7 +207,7 @@
Step 4
{{< /twsnippet/wrapper >}}
- Step 5
+ Step 6
Import components which are you intend to use and necessary function
initTE
. Initialize initTE
in a lifecycle method.
@@ -200,14 +217,32 @@
Step 5
{{< twsnippet/wrapper "App.jsx" "" "mobile" >}}
{{< twsnippet/code active=true lang="JavaScript" >}}
- import { useEffect } from "react";
- import { Datepicker, Input, initTE } from "tw-elements";
-
+ import React, { useEffect } from "react";
+ import { Datepicker, Input, initTE } from "tw-elements";
+
+ const App = () => {
useEffect(() => {
initTE({ Datepicker, Input });
}, []);
- {{< /twsnippet/code >}}
- {{< /twsnippet/wrapper >}}
+
+ return (
+
+
+ Select a date
+
+ ); }; export default App;
+ {{< /twsnippet/code >}}
+ {{< /twsnippet/wrapper >}}
@@ -230,26 +265,19 @@ Step 5
Step 1
- Import components which are you intend to use.
-
-
-
- {{< twsnippet/wrapper "App.jsx" "" "mobile" >}}
- {{< twsnippet/code active=true lang="JavaScript" >}}
- import { Datepicker, Input } from "tw-elements";
- {{< /twsnippet/code >}}
- {{< /twsnippet/wrapper >}}
-
-
- Step 2
- Initialize components in lifecycle hook.
+
+ Import components which are you intend to use and initialize components in
+ lifecycle hook.
+
{{< twsnippet/wrapper "App.jsx" "" "mobile" >}}
{{< twsnippet/code active=true lang="JavaScript" >}}
import { useEffect } from "react";
+ import { Datepicker, Input } from "tw-elements";
+ const App = () => {
useEffect(() => {
const myInput = new Input(document.getElementById("myDatepicker"));
const options = {
@@ -260,7 +288,24 @@
Step 2
options
);
}, []);
- {{< /twsnippet/code >}}
+
+ return (
+
+
+ Select a date
+
+ ); }; export default App;
+ {{< /twsnippet/code >}}
{{< /twsnippet/wrapper >}}
diff --git a/site/content/docs/standard/integrations/remix/index.html b/site/content/docs/standard/integrations/remix/index.html
index 4381737ba..0b3892af3 100644
--- a/site/content/docs/standard/integrations/remix/index.html
+++ b/site/content/docs/standard/integrations/remix/index.html
@@ -147,7 +147,8 @@ Step 3
theme: {
extend: {},
},
- plugins: [require("tw-elements/dist/plugin")]
+ darkMode: "class",
+ plugins: [require("tw-elements/dist/plugin.cjs")]
}
{{< /twsnippet/code >}}
{{< /twsnippet/wrapper >}}
@@ -175,6 +176,7 @@ Step 4
Import the newly-created ./app/tailwind.css
file in your
./app/root.jsx
file.
+ Also attach the Roboto
font.
@@ -184,6 +186,7 @@
Step 4
export const links: LinksFunction = () => [
{ rel: "stylesheet", href: stylesheet },
+ { rel: "stylesheet", href: "https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" }
];
{{< /twsnippet/code >}}
{{< /twsnippet/wrapper >}}
@@ -203,27 +206,44 @@
Step 5
Step 6
- Create standalone component which will has a name with
- Component.client.jsx
. It shows framework that should not render
- this component in a server-side mode.
-
-
- Import components which are you intend to use and necessary function
- initTE
. Initialize initTE
in a lifecycle method.
+ Create standalone file with name of your component (for example
+ MyDatepicker.client.jsx
(it shows framework that should not
+ render this component in a server-side mode) in
+ app/components
directory) and import TE components which are
+ you intend to use. Also include necessary function initTE
.
+ Initialize initTE
in a lifecycle method.
- {{< twsnippet/wrapper "Component.client.jsx" "" "mobile" >}}
+ {{< twsnippet/wrapper "MyDatepicker.client.jsx" "" "mobile" >}}
{{< twsnippet/code active=true lang="JavaScript" >}}
- import { useEffect } from "react";
- import { Datepicker, Input, initTE } from "tw-elements";
-
+ import { useEffect } from "react";
+ import { Datepicker, Input, initTE } from "tw-elements";
+
+ const MyDatepicker = () => {
useEffect(() => {
initTE({ Datepicker, Input });
}, []);
- {{< /twsnippet/code >}}
- {{< /twsnippet/wrapper >}}
+
+ return (
+
+
+
+ Select a date
+
+
+ ); }; export default MyDatepicker;
+ {{< /twsnippet/code >}}
+ {{< /twsnippet/wrapper >}}
Step 7
@@ -239,20 +259,23 @@
Step 7
Step 8
- Import your client-side component.
+
+ Import (for example in index.js
) newly created component
+ wrapping it into ClientOnly
element.
+
{{< twsnippet/wrapper "root.jsx" "" "mobile" >}}
{{< twsnippet/code active=true lang="JavaScript" >}}
import { ClientOnly } from "remix-utils";
- import Component from "./components/Component.client";
+ import MyDatepicker from "./components/MyDatepicker.client";
...
export default function App() {
return (
...
-
{() => }
+
{() => }
); }
{{< /twsnippet/code >}}
{{< /twsnippet/wrapper >}}
@@ -278,37 +301,44 @@
Step 8
Step 1
-
Import components which are you intend to use.
-
-
-
- {{< twsnippet/wrapper "Component.client.jsx" "" "mobile" >}}
- {{< twsnippet/code active=true lang="JavaScript" >}}
- import { Datepicker, Input } from "tw-elements";
- {{< /twsnippet/code >}}
- {{< /twsnippet/wrapper >}}
-
-
-
Step 2
-
Initialize component in lifecycle hook.
+
+ Import components which are you intend to use and iniitialize them in
+ lifecycle hook.
+
- {{< twsnippet/wrapper "Component.client.jsx" "" "mobile" >}}
- {{< twsnippet/code active=true lang="JavaScript" >}}
- import { useEffect } from "react";
-
- useEffect(() => {
- const myInput = new Input(document.getElementById("myDatepicker"));
- const options = {
- format: "dd-mm-yyyy",
- };
- const myDatepicker = new Datepicker(
- document.getElementById("myDatepicker"),
- options
- );
- }, []);
- {{< /twsnippet/code >}}
+ {{< twsnippet/wrapper "MyDatepicker.client.jsx" "" "mobile" >}}
+ {{< twsnippet/code active=true lang="JavaScript" >}}
+ import { useEffect } from "react";
+ import { Datepicker, Input } from "tw-elements";
+
+ const MyDatepicker = () => {
+ useEffect(() => {
+ const myInput = new Input(document.getElementById("myDatepicker"));
+ const options = {
+ format: "dd-mm-yyyy",
+ };
+ const myDatepicker = new Datepicker(
+ document.getElementById("myDatepicker"),
+ options
+ );
+ }, []);
+
+ return (
+
+
+
+ Select a date
+
+
+ ); }; export default MyDatepicker;
+ {{< /twsnippet/code >}}
{{< /twsnippet/wrapper >}}
diff --git a/site/content/docs/standard/integrations/solid/index.html b/site/content/docs/standard/integrations/solid/index.html
index 7c920a98a..8bed0560b 100644
--- a/site/content/docs/standard/integrations/solid/index.html
+++ b/site/content/docs/standard/integrations/solid/index.html
@@ -136,7 +136,8 @@
Step 2
theme: {
extend: {},
},
- plugins: [require("tw-elements/dist/plugin")]
+ darkMode: "class",
+ plugins: [require("tw-elements/dist/plugin.cjs")]
}
{{< /twsnippet/code >}}
{{< /twsnippet/wrapper >}}
@@ -160,6 +161,22 @@
Step 3
Step 4
+
+ Attach the Roboto
font in index.html
.
+
+
+
+
+ {{< twsnippet/wrapper "index.html" "" "mobile" >}}
+ {{< twsnippet/code active=true lang="HTML" >}}
+
+ {{< /twsnippet/code >}}
+ {{< /twsnippet/wrapper >}}
+
+
+ Step 5
Install Tailwind Elements.
@@ -171,7 +188,7 @@
Step 4
{{< /twsnippet/wrapper >}}
- Step 5
+ Step 6
Import components which are you intend to use and necessary function
initTE
. Initialize initTE
in a lifecycle method.
@@ -181,12 +198,38 @@
Step 5
{{< twsnippet/wrapper "App.jsx" "" "mobile" >}}
{{< twsnippet/code active=true lang="JavaScript" >}}
- import { onMount } from "solid-js";
- import { Datepicker, Input, initTE } from "tw-elements";
-
+ import { onMount } from "solid-js";
+ import { Datepicker, Input, initTE } from "tw-elements";
+
+ const App = () => {
onMount(() => {
initTE({ Datepicker, Input });
});
+
+ return (
+ <>
+
+
+
+ Select a date
+
+
+ >
+ );
+ };
+
+ export default App;
{{< /twsnippet/code >}}
{{< /twsnippet/wrapper >}}
@@ -217,20 +260,10 @@ Step 1
{{< twsnippet/wrapper "App.jsx" "" "mobile" >}}
{{< twsnippet/code active=true lang="JavaScript" >}}
- import { Datepicker, Input, initTE } from "tw-elements";
- {{< /twsnippet/code >}}
- {{< /twsnippet/wrapper >}}
-
-
- Step 2
- Initialize components in lifecycle hook.
-
-
-
- {{< twsnippet/wrapper "App.jsx" "" "mobile" >}}
- {{< twsnippet/code active=true lang="JavaScript" >}}
- import { onMount } from "solid-js";
-
+ import { onMount } from "solid-js";
+ import { Datepicker, Input } from "tw-elements";
+
+ const App = () => {
onMount(() => {
const myInput = new Input(document.getElementById("myDatepicker"));
const options = {
@@ -241,6 +274,30 @@
Step 2
options
);
});
+
+ return (
+ <>
+
+
+
+ Select a date
+
+
+ >
+ );
+ };
+
+ export default App;
{{< /twsnippet/code >}}
{{< /twsnippet/wrapper >}}
diff --git a/site/content/docs/standard/integrations/svelte/index.html b/site/content/docs/standard/integrations/svelte/index.html
index e086dc46f..697e873f6 100644
--- a/site/content/docs/standard/integrations/svelte/index.html
+++ b/site/content/docs/standard/integrations/svelte/index.html
@@ -141,7 +141,8 @@ Step 2
theme: {
extend: {},
},
- plugins: [require("tw-elements/dist/plugin")]
+ darkMode: "class",
+ plugins: [require("tw-elements/dist/plugin.cjs")]
}
{{< /twsnippet/code >}}
{{< /twsnippet/wrapper >}}
@@ -192,6 +193,22 @@ Step 4
Step 5
+
+ Attach the Roboto
font in app.html
.
+
+
+
+
+ {{< twsnippet/wrapper "app.html" "" "mobile" >}}
+ {{< twsnippet/code active=true lang="HTML" >}}
+
+ {{< /twsnippet/code >}}
+ {{< /twsnippet/wrapper >}}
+
+
+ Step 6
Create a ./src/routes/+layout.svelte
file and import the
newly-created app.css
file.
@@ -210,7 +227,7 @@
Step 5
{{< /twsnippet/wrapper >}}
- Step 6
+ Step 7
Install Tailwind Elements.
@@ -222,9 +239,10 @@
Step 6
{{< /twsnippet/wrapper >}}
- Step 7
+ Step 8
- Import components which are you intend to use and necessary function
+ Create file +page.svelte
in src
directory and then
+ import components which are you intend to use and necessary function
initTE
. Initialize initTE
in a lifecycle method.
@@ -232,14 +250,31 @@ Step 7
{{< twsnippet/wrapper "+page.svelte" "" "mobile" >}}
{{< twsnippet/code active=true lang="JavaScript" >}}
- import { onMount } from "svelte";
- import { Datepicker, Input, initTE } from "tw-elements";
+
+
+
+
+ Select a date
+
+ {{< /twsnippet/code >}}
+ {{< /twsnippet/wrapper >}}
@@ -264,37 +299,42 @@ Step 7
Step 1
- Import library.
-
-
-
- {{< twsnippet/wrapper "+page.svelte" "" "mobile" >}}
- {{< twsnippet/code active=true lang="JavaScript" >}}
- import { Datepicker, Input } from "tw-elements";
- {{< /twsnippet/code >}}
- {{< /twsnippet/wrapper >}}
-
-
- Step 2
- Initialize components in lifecycle hook.
+
+ Import library and initialize components in lifecycle method.
+
{{< twsnippet/wrapper "+page.svelte" "" "mobile" >}}
{{< twsnippet/code active=true lang="JavaScript" >}}
- import { onMount } from "svelte";
+
- onMount(() => {
- const myInput = new Input(document.getElementById("myDatepicker"));
- const options = {
- format: "dd-mm-yyyy",
- };
- const myDatepicker = new Datepicker(
- document.getElementById("myDatepicker"),
- options
- );
- });
- {{< /twsnippet/code >}}
+
+
+ Select a date
+
+ {{< /twsnippet/code >}}
{{< /twsnippet/wrapper >}}
diff --git a/site/content/docs/standard/integrations/vue/index.html b/site/content/docs/standard/integrations/vue/index.html
index f67d8034c..3e8d85d6b 100644
--- a/site/content/docs/standard/integrations/vue/index.html
+++ b/site/content/docs/standard/integrations/vue/index.html
@@ -131,7 +131,7 @@ Step 1
{{< twsnippet/wrapper "Terminal" "" "mobile" >}}
{{< twsnippet/code active=true lang="plaintext" type="terminal" >}}
npm install -D tailwindcss postcss autoprefixer
- npx tailwindcss init
+ npx tailwindcss init -p
{{< /twsnippet/code >}}
{{< /twsnippet/wrapper >}}
@@ -156,7 +156,8 @@ Step 2
theme: {
extend: {},
},
- plugins: [require("tw-elements/dist/plugin")]
+ darkMode: "class",
+ plugins: [require("tw-elements/dist/plugin.cjs")]
}
{{< /twsnippet/code >}}
{{< /twsnippet/wrapper >}}
@@ -180,6 +181,22 @@ Step 3
Step 4
+
+ Attach the Roboto
font in index.html
.
+
+
+
+
+ {{< twsnippet/wrapper "index.html" "" "mobile" >}}
+ {{< twsnippet/code active=true lang="HTML" >}}
+
+ {{< /twsnippet/code >}}
+ {{< /twsnippet/wrapper >}}
+
+
+ Step 5
Install Tailwind Elements.
@@ -191,7 +208,7 @@
Step 4
{{< /twsnippet/wrapper >}}
- Step 5
+ Step 6
Import components which are you intend to use and necessary function
initTE
. Initialize initTE
in a lifecycle method.
@@ -199,16 +216,36 @@
Step 5
- {{< twsnippet/wrapper "App.vue" "" "mobile" >}}
- {{< twsnippet/code active=true lang="JavaScript" >}}
- import { onMounted } from "vue";
- import { Datepicker, Input, initTE } from "tw-elements";
+ {{< twsnippet/wrapper "script,template" "" "mobile" >}}
+ {{< twsnippet/code active=true lang="HTML" >}}
+
+ {{< /twsnippet/code >}}
+ {{< twsnippet/code lang="HTML" >}}
+
+
+
+ Select a date
+
+
+ {{< /twsnippet/code >}}
+ {{< /twsnippet/wrapper >}}
@@ -233,37 +270,45 @@ Step 5
Step 1
- mport components which are you intend to use.
-
-
-
- {{< twsnippet/wrapper "App.vue" "" "mobile" >}}
- {{< twsnippet/code active=true lang="JavaScript" >}}
- import { Datepicker, Input } from "tw-elements";
- {{< /twsnippet/code >}}
- {{< /twsnippet/wrapper >}}
-
-
- Step 2
- Initialize components in lifecycle hook.
+
+ Import components which are you intend to use and initialize them in
+ lifecycle hook.
+
- {{< twsnippet/wrapper "App.vue" "" "mobile" >}}
- {{< twsnippet/code active=true lang="JavaScript" >}}
- import { onMounted } from "vue";
+ {{< twsnippet/wrapper "script,template" "" "mobile" >}}
+ {{< twsnippet/code active=true lang="HTML" >}}
+
+ {{< /twsnippet/code >}}
+ {{< twsnippet/code lang="HTML" >}}
+
+
+
+ Select a date
+
+
+ {{< /twsnippet/code >}}
{{< /twsnippet/wrapper >}}