... DASHmin ...
DASHmin is only a base for the development of your Administrative System! it still (still ;) .. does not have a range of components, but is well on the way to help you in development! By default Bootstrap is already included, if you know the basics of it,easily create your pages!
If you want to create your admin using DASHmin, follow the installation tutorial below!
✓ Structure
├── node_modules├── src│ ├── components│ ├── store│ ├── dashmin.js│ ├── index.js├── .editorconfig├── .eslintrc.json├── .gitignore├── .travis.yml├── package.json├── README.md├── LICENCE.md├── logo.png└── dashmin.png
✓ Requirements
To run this project, you need to have Node.js installed on your machine! If you do not have it, go to the website https://nodejs.org/en/ and download and install it as it is taught in the documentation!
✓ Instalation
To get started, create your application using the create-react-app
.
create-react-app example
Install
After creating the application using create-react-app
enter the project folder, open the terminal and install thedashmin
.
yarn add dashmin
or
npm i dashmin
✓ How to use
Dashmin is just a basic interface to help you in creating your admin dashboard. After you download and install the dependencies, you can start your application.
To begin, delete all files inside src/
, leaving only index.js
andapp.js
. after doing so create two new views
androutes
folders.
├── node_modules├── src│ ├── views│ ├── routes│ ├── app.js│ ├── index.js├── package.json
views/example.js
Within the views
directory create your view component to be rendered.
// Imports; // Productsconst Example01 = <div> <h1>Example01</h1> </div>; ;
// Imports; // Productsconst Example02 = <div> <h1>Example02</h1> </div>; ;
routes/index.js
Shortly after creating your view component create a route file by passing the following properties.
// Routesconst Routes = example01: '/example01' example02: '/example02';
After defining the routes, define a const Dashmin
by passing defining properties. Dashmin requires information for navbar
,sidebar
and content
. so it is important to inform them.
const Dashmin = // navbar navbar: // sidebar sidebar: // Content content:
navbar: {}
in navbar you need to pass a user
object, passingavatar
, name
andjobRole
. these will be the information displayed in the dropdown.
const Dashmin = // navbar navbar: user: avatar: 'https://imgur.com/NpICPSl.jpg' name: 'R o m u l l o' jobRole: 'Administrator'
sidebar: {}
For the sidebar
you need to passbrand
and buttons
. For brand
you need to pass only the name of your organization by entering the full namemax
and abbreviated min
.
For buttons
, aname
, icon
androute
are required.
Sobre os icones .. o Dashmin usa o React icons
, então você pode simplesmente importar os icones que deseja usar e passar o component para icon.
// Icons const Dashmin = // sidebar sidebar: // brand brand: max: 'D A S H M I N' min: 'dmin' // buttons buttons: name: 'Example01' icon: component: <IoMdOptions /> route: Routesexample01 name: 'Example02' icon: component: <IoMdOptions /> route: Routesexample02
content: []
Finally the part of content. For it will be necessary to pass an array of objects containing the route
and the visualization component to be redemptivelyview
.
// Views;; const Dashmin = // content content: route: Routesexample01 view: Example01 route: Routesexample02 view: Example02
Full configuration
The Route file containing the settings made above.
// React; // Views;;;;; // Icons // Routesconst Routes = dashboard: '/' users: '/users' financial: '/financial' products: '/products' reports: '/reports'; // Dashminconst Dashmin = // Navbar navbar: user: avatar: 'https://imgur.com/NpICPSl.jpg' name: 'R o m u l l o' jobRole: 'Administrator' // Sidebar sidebar: // brand brand: max: 'D A S H M I N' min: 'dmin' // buttons buttons: name: 'Example01' icon: component: <IoMdOptions /> route: Routesexample01 name: 'Example02' icon: component: <IoMdOptions /> route: Routesexample02 // Content content: route: Routesexample01 view: Example01 route: Routesexample02 view: Example02 ; ;
app.js
Finally, in your app.js
importdashmin
and pass the following properties.
// Imports;;; const App = <Dashmin navbar=routesnavbar sidebar=routessidebar content=routescontent />; ;
For more exexmplos you can check https://github.com/hiukky/dashmin-react/tree/demo.
Finishing
After you have followed the steps above, you can now test your application using one of the commands below.
yarn run start
or
npm run start
Ready!! if everything went well, just check your application in the browser http://127.0.0.1:3000/.
✓ Preview
✔ Demo
✓ Libraries
Some frontend libs included.