Manual installation (zip package)
Step 1.
Download the package from orders
Step 2.
Unzip downloaded package and open it in the code editor
Step 3.
Explore our documentation (menu on the left). Choose components you like, copy it to your project and compose your website. And yes, it's that simple!
NPM
Prerequisites
Before starting a project make sure to install Node LTS (16.x.x + recommended) and generate gitlab access token.
Installation
To install TW Elements in your project easily type the following command in the terminal. Remember to swap the access token before starting the installation.
npm i
git+https://oauth2:ACCESS_TOKEN@git.mdbootstrap.com/mdb/twe-standard/prd/tw-elements-pro-essential
Importing JS modules
You can import the entire library or just individual modules:
import { Input, initTWE } from 'tw-elements';
initTWE({ Input });
import * as twe from 'tw-elements/js/tw-elements.umd.min.js';
window.twe = twe;
Importing CSS file
To import TWE stylesheet please use the following syntax:
@import '~tw-elements/css/tw-elements.min.css';