MDB 5 React
React 17 & Bootstrap 5 & Material Design 2.0 UI KIT
|
|
Trusted by 2 000 000+ developers & designers. Used by companies like
Tutorial for the latest Bootstrap v.5 Alpha. In this video we'll learn about the changes implemented into v.5.
>> Click here for a written tutorial
|
|
Start to Code |
Learn Bootstrap 5 | Crash Course for Beginners in 1.5H |
Demo
Simplicity and ease of use are key features of MDB 5 React UI Kit. You need only one minute to install and run it.
Buttons
Use MDB custom button styles for actions in forms, dialogs, and more with support for multiple sizes, states, and more.
Spinners
Indicate the loading state of a component or page with MDB spinners, built entirely with HTML, CSS, and no JavaScript.
Cards
A card is a flexible and extensible content container. It includes options for headers and footers, a wide variety of content, contextual background colors, and powerful display options.
Footer
A footer is an additional navigation component. It can hold links, buttons, company info, copyrights, forms, and many other elements.
Hover
MDB hover effect appears when the user positions the computer cursor over an element without activating it. Hover effects make a website more interactive.
Notes
Notes are small components very helpful in inserting an additional piece of information.
and more.
Not working with create-react-app
I get the following error:
./node_modules/mdbreact/src/components/TextField.js Module parse failed: Unexpected token (101:6) You may need an appropriate loader to handle this file type. | icon, | iconClass, | ...attributes | } = this.props; |
Can't resolve 'mdbreact'
Hello,
When i try to import Button and Collapse, i get:
Import:
import { Button, Collapse } from 'mdbreact';
Error:
Module not found: Can't resolve 'mdbreact' in 'C:\wamp64\www\bob-web\notice-cmi\src\components\Collapsable'
I installed it with npm. Did i miss something ?
Error with Navbar component due to React 16
Context I develop an SPA app with React 16.2.0. I'm using the last version of mdbreact : 4.1.0 I would like to use the Navbar component.
Steps to reproduce
Create a test project
npx react-create-app test-issue
Check if the react version is >= 16.0.0
In App.js, replace the content with the followings
Launch the app
npm start
An error is display
Problem
After some deeply research, I found the source of the trouble. https://github.com/mdbootstrap/React-Bootstrap-with-Material-Design/blob/65b8f6b66559ed6bbaed5eff3c485d355e724e2a/src/components/Navbar.js#L75
String is not anymore accepted for ref. You can have a look on the official documentation of React : https://reactjs.org/docs/refs-and-the-dom.html#legacy-api-string-refs
According to the above informations and the changelog (cf https://github.com/facebook/react/blob/master/CHANGELOG.md), it is very much possible that the functionnalty was deleted.
Dependency of React 16 is not updated
its mentioned that version 4.1.0 is updated for React 16. but its package.json have dependency : "react": "^15.6.1", "react-dom": "^15.6.1",
which cause multiple node_module installation dependency error:
invariant.js:42 Uncaught Error: Element ref was specified as a string (ripple) but no owner was set. You may have multiple copies of React loaded. (details: https://fb.me/react-refs-must-have-owner). at invariant (invariant.js:42) at coerceRef (react-dom.development.js:6736) at reconcileSingleElement (react-dom.development.js:7532) at reconcileChildFibers (react-dom.development.js:7635) at reconcileChildrenAtExpirationTime (react-dom.development.js:7756) at reconcileChildren (react-dom.development.js:7747) at finishClassComponent (react-dom.development.js:7881) at updateClassComponent (react-dom.development.js:7850) at beginWork (react-dom.development.js:8225) at performUnitOfWork (react-dom.development.js:10224)
Attempted import error: 'MDBAvatar' is not exported from 'mdbreact'.
First, I installed mdbreact package from npm. After adding the Component it is showing the following error. My React version is 16.12.0.
Attempted import error: 'MDBAvatar' is not exported from 'mdbreact'.
Can anyone help me to resolve this issue?
Cannot find module './factoryWithThrowingShims'
Expected behavior
When adding mdbreact to my existing project, expected it to run as is
Actual behavior
I get the error
Your working environment and MDB version information
Node : v7.3.0 NPM : 5.5.1 React : Both 15.6.1 and 16 mdbreact : both via npm install (4.2.0) and git+https://github.com/mdbootstrap/React-Bootstrap-with-Material-Design.git
I am using Browserify and babelify to parse JS with babel-preset-env and babel-preset-react
Resources (screenshots, code snippets etc.)
MDB Datatable select all with checkbox
Hi I'm trying to do https://mdbootstrap.com/docs/react/tables/additional/ like this but with select all option. But I can't able to achieve this using mdb bootstrap. May I get any help on this or any documentation?
MDBDropdown has issue when using in react-styleguidist
I am facing issue in MDBDropdown component from the mdb-react-ui-kit package while using it with react-styleguidist. Here when I click on Search Options the component disappears and shows error in console.
NOTE - I am using react version 17.0.2 and the latest version of mdb-react-ui-kit
Checkbox multiselect automatically with datatable
Using checkbox in 'MDBDataTable' with pagination there is one issue with it... When I click on checkbox of a particular position of data table (For example 1st row of the data table) of 1st page, than checkbox of all other pages automatically selected at same position.
Means if I check any checkbox of any row of any page, its automatically checked same position(row) of all other pages.
window is not defined with NextJS
I'm trying to use mdbreact in a existig project with NextJs. This is the code:
And this is the error that is showing:
I've installed from 2 wayes:
I will have made a mistake? Nobody uses yet mdbreact with NextJs? I think something happends in server side rendering. I'm not sure.
Thanks
Trying to close modal invoke an Error with React 16.2.0
when trying to close a modal i'm getting an error mdbreact.js:2046 Uncaught TypeError: Cannot read property 'contains' of undefined at Modal.handleBackdropClick
this is actually happens no matter where i click after the modal is open, clicking at the screen just invoking the error
inside my package.json
"react": "^16.2.0", "react-dom": "^16.2.0", "mdbreact":"git+https://github.com/mdbootstrap/React-Bootstrap-with-Material-Design.git#react-upgrade",
@smolenski-mikolaj :)