Airframe

High Quality Dashboard / Admin / Analytics template that works great on any...

README

Airframe React


High Quality Dashboard / Admin / Analytics template that works great on any smartphone, tablet or desktop. Available as Open Source as MIT license.

- [View Demo](http://dashboards.webkom.co/react/airframe/)
- [Next Version](https://github.com/webkom-co/airframe-next) - Now is available
- Angular Version - _Documentation in preparation_
- Vue Version - _Documentation in preparation_
- MVC.Net Version - _Documentation in preparation_
- Sketch Files (Soon)

aiframe-2019-light-primary-ExchangeTrading2x-bfc026c1-0477-45c8-ba55-f6dd43141e4c

Introduction


Airframe Dashboard with a minimalist design and innovative Light UI will let you build an amazing and powerful application with great UI. Perfectly designed for large scale applications, with detailed step by step documentation.

This Airframe project is a typical Webpack based React app, React Router also included together with customised Reacstrap. This project has all of it's few dependencies up to date and it will be updated on a regular basis. This project doesn't support SSR. If you need it - use the NextJs based version.

Features


Airframe Dashboard has a huge collection of components that can be used in a great number of combinations and variations. It can be used in all types of custom web applications such as CRMs, CMSs, Admin Panels, Admin Dashboards, Analytics, etc.

- 10+ Layout Variations - a multitude of possibilities to rearrange the layout, allows to customize the look of your application just as you imagined.
- Applications - applications ready, allows you to save time and focus on project development.
- UI Components - we offer you a large number of UI components; fully ready for changes that will customize them for your needs.
- Responsive Design - fully adapted to your application, exactly well presented on the desktop, a tablet or smartphone.
- 120+ Unique Pages designed to make use of them directly in your application.
- 2 Starters so that you can immediately work with the components that are necessary for your application.

Author


Tomasz Owczarczyk:


Installation


Initial Configuration:

You need to have NodeJs (>= 10.0.0) installed on your local machine, before attempting to run a dev environment.

1. Extract contents of the package to your local machine.
2. Using the Terminal navigate to the extracted contents.
3. Run npm install.

Make sure you have a file called .npmrc in the extracted directory. Those files are typically hidden in Unix based systems.

Development

To start the development environment type npm start in the console. This will start a development server with hot reloading enabled.

Production

To create a production build type npm run build:prod. After the process is complete you can copy the output from the /dist/ directory. The output files are minified and ready to be used in a production environment.

Build Customization

You can customize the build to suit your specific needs by adjusting the Webpack configuration files. Those files can be found in the/build directory. For more details checkout the documentation of WebPack.

Project Details

Some points of interest about the project project structure:

app/components - custom React components should go here
app/styles - styles added here won't be treated as CSS Modules, so any global classes or library styles should go here
app/layout - the AppLayout component can be found here which hosts page contents within itself; additional sidebars and navbars should be placed in ./components/ subdir.
app/colors.js - exports an object with all of the defined colors by the Dashboard. Useful for styling JS based components - for example charts.
app/routes - PageComponents should be defined here, and imported via index.js. More details on that later.

Defining Routes

Route components should be placed in separate directories inside the /routes/ directory. Next you should open /routes/index.js file and attach the component. You can do this in two diffrent ways:

Static Imports

Pages imported statically will be loaded eagerly on PageLoad with all of the other content. There will be no additional loads when navigating to such pages BUT the initial app load time will also be longer. To add a statically imported page it should be done like this:

  1. ``` js
  2. // Import the default component
  3. import SomePage from './SomePage';
  4. // ...
  5. export const RoutedContent = () => {
  6.     return (
  7.         <Switch>
  8.             { /* ... */ }
  9.             { /* Define the route for a specific path */ }
  10.             <Route path="/some-page" exact component={SomePage} />
  11.             { /* ... */ }
  12.         </Switch>
  13.     );
  14. }
  15. ```

Dynamic Imports

Dynamically imported pages will only be loaded when they are needed. This will decrease the size of the initial page load and make the App load faster. You can use React.Suspense to achieve this. Example:
  1. ``` js
  2. // Create a Lazy Loaded Page Component Import
  3. const SomeAsyncPage = React.lazy(() => import('./SomeAsyncPage'));
  4. // ...
  5. export const RoutedContent = () => {
  6.     return (
  7.         <Switch>
  8.             { /* ... */ }
  9.             { /*
  10.                 Define the route and wrap the component in a React.Suspense loader.
  11.                 The fallback prop might contain a component which will be displayed
  12.                 when the page is loading.
  13.             */ }
  14.             <Route path="/some-async-page">
  15.                 <React.Suspense fallback={ <PageLoader /> }>
  16.                     <SomeAsyncPage />
  17.                 </React.Suspense>
  18.             </Route>
  19.         </Switch>
  20.     );
  21. }
  22. ```

Route specific Navbars and Sidebars

Sometimes you might want to display additional content in the Navbar or the Sidebar. To do this you should define a customized Navbar/Sidebar component and attach it to a particular route. Example:

  1. ``` js
  2. import { SidebarAlternative } from './../layout/SidebarAlternative';
  3. import { NavbarAlternative } from './../layout/NavbarAlternative';
  4. // ...
  5. export const RoutedNavbars  = () => (
  6.     <Switch>
  7.         { /* Other Navbars: */}
  8.         <Route
  9.             component={ NavbarAlternative }
  10.             path="/some-custom-navbar-route"
  11.         />
  12.         { /* Default Navbar: */}
  13.         <Route
  14.             component={ DefaultNavbar }
  15.         />
  16.     </Switch>  
  17. );

  18. export const RoutedSidebars = () => (
  19.     <Switch>
  20.         { /* Other Sidebars: */}
  21.         <Route
  22.             component={ SidebarAlternative }
  23.             path="/some-custom-sidebar-route"
  24.         />
  25.         { /* Default Sidebar: */}
  26.         <Route
  27.             component={ DefaultSidebar }
  28.         />
  29.     </Switch>
  30. );
  31. ```

Theming

You can set the color scheme for the sidebar and navbar by providing `initialStyle` and `initialColor` to the `` component which should be wrapping the `` component.

Possible initialStyle values:
light
dark
color

Possible initialColor values:
primary
success
info
warning
danger
indigo
purple
pink
yellow

Programatic Theme Changing

You can change the color scheme on runtime by using the ThemeConsumer from the components. Example:
  1. ``` js
  2. // ...
  3. import { ThemeContext } from './../components';
  4. // ...
  5. const ThemeSwitcher = () => (
  6.     <ThemeConsumer>
  7.         ({ onChangeTheme }) => (
  8.             <React.Fragment>
  9.                 <Button onClick={() => onThemeChange({ style: 'light' })}>
  10.                     Switch to Light
  11.                 </Button>
  12.                 <Button onClick={() => onThemeChange({ style: 'dark' })}>
  13.                     Switch to Dark
  14.                 </Button>
  15.             </React.Fragment>
  16.         )
  17.     </ThemeConsumer>
  18. );

  19. ```

Options provided by the ThemeConsumer:
style - current theme style
color - current theme color
onChangeTheme({ style?, color? }) - allows to change the theme

Credits

Used plugins in this dashboard:

React 16.9.x - A JavaScript library for building user interfaces
Bootstrap 4.x - Bootstrap is the most popular HTML, CSS, and JS framework
reactstrap 5.x.x - Simple React Bootstrap 4 components
Peity 3.3.x - progressive pie, donut, bar and line charts
Font Awesome 4.7.x - Font Awesome, the iconic font and CSS framework.
Holder 2.x.x -  client side image placeholders
Lodash 7.x.x - A modern JavaScript utility library delivering modularity, performance & extras.
Moment 7.x.x - Parse, validate, manipulate, and display dates in javascript.
react-beautiful-dnd 11.0.4 - Beautiful and accessible drag and drop for lists with React
react-big-calendar 0.22.x - gcal/outlook like calendar component
react-bootstrap-table-next 3.1.4 - Next Generation of react-bootstrap-table
react-bootstrap-typeahead 4.x.x - React typeahead with Bootstrap styling
react-datepicker 2.7.0 - A simple and reusable datepicker component for React
react-dropzone 10.x.x - Simple HTML5 drag-drop zone with React.js
react-grid-layout 0.16.x - A draggable and resizable grid layout with responsive breakpoints, for React.
react-helmet 5.x.x - A document head manager for React
react-hot-loader 4.11.x - Tweak React components in real time.
react-quill 1.x.x - A Quill component for React
react-image-crop 8.0.2 - A responsive image cropping tool for React
react-router 5.x.x - Declarative routing for React
text-mask 5.x.x - Input mask for React
react-toastify 5.x.x - React notification made easy
react-toggle 4.x.x - Elegant, accessible toggle component for React. Also a glorified checkbox.
reacharts 1.x.x - Redefined chart library built with React and D3