### Run Application (MDB CLI) Source: https://github.com/mdbootstrap/tw-elements/blob/master/README.md Command to start the application initialized and set up with MDB CLI. This typically launches a development server to view the project. ```Shell npm start ``` -------------------------------- ### Publish Application (MDB CLI) Source: https://github.com/mdbootstrap/tw-elements/blob/master/README.md Command to publish the application using MDB CLI. This deploys the project to MDB GO's hosting service. ```Shell mdb publish ``` -------------------------------- ### Install MDB CLI Globally Source: https://github.com/mdbootstrap/tw-elements/blob/master/README.md Command to globally install the MDB CLI using NPM. This CLI tool is required to use the MDB GO / CLI method for project creation and management. ```Shell npm install -g mdb-cli ``` -------------------------------- ### Install Project Dependencies (MDB CLI) Source: https://github.com/mdbootstrap/tw-elements/blob/master/README.md Command to install project dependencies within an MDB CLI initialized project directory. This ensures all required packages for the TW Elements project are available. ```Shell npm install ``` -------------------------------- ### Install TW Elements via NPM Source: https://github.com/mdbootstrap/tw-elements/blob/master/README.md Command to install the TW Elements package using Node Package Manager (NPM). This is the first step for setting up TW Elements in a project using NPM. ```Shell npm install tw-elements ``` -------------------------------- ### Initialize TW Elements Project with MDB CLI Source: https://github.com/mdbootstrap/tw-elements/blob/master/README.md Command to initialize a new project using MDB CLI, specifically choosing the 'Tailwind Elements' template. This sets up a new project with TW Elements pre-configured. ```Shell mdb init tailwind-elements-free ``` -------------------------------- ### Include TW Elements CDN Stylesheets and Tailwind Config Source: https://github.com/mdbootstrap/tw-elements/blob/master/README.md HTML head section code for including Google Fonts, TW Elements CSS, and Tailwind CSS from CDN, along with an inline Tailwind configuration for dark mode, fonts, and preflight. This method allows quick testing without local installations. ```HTML ``` -------------------------------- ### Log in to MDB CLI Source: https://github.com/mdbootstrap/tw-elements/blob/master/README.md Command to authenticate with your MDB account via the MDB CLI. This step is necessary to access MDB GO services and project templates. ```Shell mdb login ``` -------------------------------- ### Import TW Elements (NPM - Bundler) Source: https://github.com/mdbootstrap/tw-elements/blob/master/README.md JavaScript import statement for bundler-based projects (e.g., Webpack, Rollup, Vite) to include TW Elements. This is an alternative to the script tag for modern JavaScript development workflows. ```JavaScript import 'tw-elements'; ``` -------------------------------- ### Load TW Elements UMD JavaScript (NPM - Script Tag) Source: https://github.com/mdbootstrap/tw-elements/blob/master/README.md HTML script tag to include the TW Elements UMD (Universal Module Definition) JavaScript file, enabling dynamic components. This method is suitable for projects that load JavaScript via script tags. ```HTML ``` -------------------------------- ### Configure Tailwind CSS for TW Elements (NPM) Source: https://github.com/mdbootstrap/tw-elements/blob/master/README.md JavaScript configuration for `tailwind.config.js` to include TW Elements as a plugin and extend content paths for dynamic component classes. This step is crucial for TW Elements to function correctly with Tailwind CSS. ```JavaScript module.exports = { content: ["./src/**/*.{html,js}", "./node_modules/tw-elements/js/**/*.js"], plugins: [require("tw-elements/plugin.cjs")], darkMode: "class" }; ``` -------------------------------- ### Include TW Elements CDN JavaScript Bundle Source: https://github.com/mdbootstrap/tw-elements/blob/master/README.md HTML script tag to include the TW Elements UMD JavaScript bundle from CDN. This script should typically be placed right before the closing `
` tag to ensure all HTML elements are loaded before the script executes. ```HTML ``` -------------------------------- ### Configure Tailwind CSS for TW Elements Source: https://github.com/mdbootstrap/tw-elements/blob/master/index.html This configuration snippet sets up Tailwind CSS for use with TW Elements. It enables dark mode based on the 'class' strategy, defines custom font families (Roboto for sans and body, ui-monospace for mono), and disables Tailwind's preflight styles to prevent conflicts, ensuring compatibility with TW Elements' styling. ```JavaScript tailwind.config = { darkMode: "class", theme: { fontFamily: { sans: ["Roboto", "sans-serif"], body: ["Roboto", "sans-serif"], mono: ["ui-monospace", "monospace"] }, }, corePlugins: { preflight: false } }; ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.