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
Install dependencies.
Step 4
Run the application.
Step 5
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
Keep in mind that the Single Use license does not allow installation via gitlab link. The only option for this type of package is manual installation.
Prerequisites
Before starting the project make sure to generate gitlab access token. and also make sure to install Node LTS (12.x.x or higher).
If you want to use package from npm you have to create a project with React. We recommend creating an app with create-react-app from react for begginers.
Step 1
Create React App. We are using React 18+ version.
Step 2
Navigate to app's directory
MDB installation
Step 1
Setup MDB
Font Awesome
Install Font Awesome.
CSS import
Add the following lines in your index.js file before the App.js file import:
Roboto font
Add the following line in public/index.html file inside
Set font family in globally css file for example src/index.css inside
src
folder as in the example:
Step 2
Launch your app
Typescript implementation
We didn't put types for this library on DefinitelyTyped yet so if you want use mdb-react-ui-kit in your ts project you have to add a declaration module with types.
In our documentation, we use TypeScript syntax. You can have some warnings without it, but the code will always work as expected.
This instruction was tested with create-react-app with typescript template.. Below are showed dependencies used to test typescript implementation.
First, you have to create a new folder inside your project. You can create in the root directory.
Inside the typings folder, you have to add a new folder with mdb-react-ui-kit name. After that you have to create new d.ts file inside mdb-react-ui-kit folder.
Inside new d.ts
file you have to create a declaration module for
mdb-react-ui-kit.
Now you have to add types declaration for this file. If you installed
mdb-react-ui-kit, you can find types inside
node_modules/mdb-react-ui-kit/dist/index.d.ts
. You have to copy
everything to declaration module for mdb-react-ui-kit without
export {...}
at the bottom of the page.
In your tsconfig file in typeRoots
option, you have to add the
path to mdb-react-ui-kit types.
Install specific version
When you install MDB from our GitLab server, the latest version of the library will be downloaded by
default. You can add #version_number
at the end of the installation command in order to install
specific MDB version.