Skip to content
A set of React components. Themable / Customizable / Light weight library
JavaScript CSS HTML
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci ci(config): update config for ci Jan 3, 2019
.github (.github)-update images for readme Dec 18, 2018
lib style(lib,doc): fix lint errors Jan 3, 2019
test style: apply eslint Sep 27, 2018
.babelrc ⬆️ (package.json)-update babel version Dec 13, 2018
.eslintignore 🔧 (webpack)-minify css files Dec 13, 2018
.eslintrc
.gitignore
.node-version Added node version Jun 25, 2018
.npmignore 🙈 (.npmignore)-add test folder to npmignore Dec 18, 2018
.travis.yml ci(config): update config for ci Jan 3, 2019
CHANGELOG.md
CODE_OF_CONDUCT.md docs: update CODE_OF_CONDUCT.md Dec 27, 2018
CONTRIBUTING.md docs: update CONTRIBUTING.md Dec 27, 2018
LICENSE Create LICENSE Dec 18, 2018
PULL_REQUEST_TEMPLATE.md Update PULL_REQUEST_TEMPLATE.md Dec 4, 2018
README.md
netlify.toml 🔧 netlify deploy fix attempt (#271) Dec 26, 2018
package-lock.json
package.json chore(package.json): css-loader => ^0.28.11, style-loader => 0.21.0 Jan 3, 2019
webpack.common.js 🚨 (root)-fix eslint errors Dec 24, 2018
webpack.config.js Working boilerplate Jun 19, 2018
webpack.prod.js 🚨 (root)-fix eslint errors Dec 24, 2018

README.md

React Lite UI
React Lite UI

A set of light weight React Components, which are easily customizable and can be bootstrapped in your project.

TravisCI TravisCI dependencies dev dependencies Codecov

Key FeaturesInstallationUsageDocumentationDemo

Key Features:

  • Any DOM element can be customized through a simple SASS file. 🎉

  • You can import individual components which doesn't affect the bundle size of your app. 🎊

  • Clean Design with minimal implementation reducing the code that is shipped to your app with pleasant UI. 🌄

  • Each component is made light-weight - around half the size of components ( and even less! ) from other popular libraries. 💪


🔗 Installation:

npm install --save react-lite-ui

🚀 Usage :

In your App.js :

import React from 'react';
import ReactDOM from 'react-dom';
import { Card } from 'react-lite-ui';

class App extends React.Component {
      render() {
        return (
          <Card
            header="Card header"
          >
            Card content
          </Card>
        );
      }
    }

ReactDOM.render(
    <App />,
    document.getElementById('root')
);

🎨 Customisation :

Let's take our App.js file, and add a Card component to it :

import React from 'react';
import ReactDOM from 'react-dom';
import { Card } from 'react-lite-ui';

class App extends React.Component {
      render() {
        return (
          <Card
            header="Am I Cute?"
            footer={
              <Button href="https://github.com/Codebrahma/react-lite-ui" type="primary" bordered>view more</Button>
            }
            elevation="medium"
          >
            <div className="col card-content">
              <img src="https://placeimg.com/300/300/animals" alt="animals" />
            </div>
          </Card>
        );
      }
    }

ReactDOM.render(
    <App />,
    document.getElementById('root')
);

Create a file named theme.scss :

:local(.card) {
      z-index: 2;
      height: fit-content;
      width: 100%;
      transition: margin 0.2s ease-in-out;
}
    
:local(.cardHeader) {
      color: #0c549c;
      text-align: center;
}
    
:local(.cardFooter) {
      justify-content: center;
      align-self: baseline;
}

Don't worry if this doesn't make sense to you. For now, we will add these styles and complete wiring up our styles to the card component.

Now, in our App.js file we will pass a theme prop to the Card component, like this :

import React from 'react';
import ReactDOM from 'react-dom';
import { Card } from 'react-lite-ui';
import theme from 'theme.scss';  // Import the styles from theme.scss

class App extends React.Component {
      render() {
        return (
          <Card
            theme={theme}       // Pass the theme as a prop to the card component here.
            header="Am I Cute?"
            footer={
              <Button href="https://github.com/Codebrahma/react-lite-ui" type="primary" bordered>view more</Button>
            }
            elevation="medium"
          >
            <div className="col card-content">
              <img src="https://placeimg.com/300/300/animals" alt="animals" />
            </div>
          </Card>
        );
      }
    }
    
 ...

So, let's take a look at what we did here :

  • We defined our own styles which we wanted to customize for the component using the card, cardHeader and cardFooter classes.

  • Then we passed the styles to the component via the theme prop which gets applied to the component's structure.


The styles that you passed are then combined with the default styles of the component to render your customised component! For more info on how to customise and various props that you can pass to your components, please visit the Documentation page.

That's all you need to do! And here's our customised card component :

screenshot

Pretty easy, right? Want to try out more components?

Simply visit our Playground page to try out the components before using and have fun playing around with them!

Contributing :

If you want to contribute, please take a look at our Contribution guidelines and raise a PR! We would love contributions!

If you find an issue or have a question, please open an issue here and we would love to help you out and keep improving this library! 😄

Thanks!

Contributors :

You can’t perform that action at this time.