Home
Softono

Leaf Ui

Open source MIT JavaScript
102
Stars
19
Forks
7
Issues
25
Watchers
6 years
Last Commit

 About Leaf Ui

πŸƒ Leaf-UI: A react component library built using styled-components

Platforms

Web Self-hosted

Languages

JavaScript

Need Help Installing Leaf Ui?

We provide expert installation service for this software. Our team will install, configure, and secure Leaf Ui on your server. plans start at just $30.

πŸƒ Leaf-UI

A react component library for web, native and amp built using styled-components

[WARNING: This is a work in progress, API is subject to change]

Installation

npm install -S leaf-ui

Usage

Wrap your App component with ThemeProvider and pass it the leaf-ui theme (or override it with custom a theme)

// index.js
import React from 'react';
import ReactDOM from 'react-dom';
import { ThemeProvider } from 'styled-components';
import leafUiTheme, { BaseStyles } from 'leaf-ui/theme';
import App from './App';

ReactDOM.render(
  <ThemeProvider theme={leafUiTheme}>
    <BaseStyles/>
    <App />
  </ThemeProvider>,
  document.getElementById('root'),
);

Import and use the components in your App.js

// App.js
import React from 'react';
import Button from 'leaf-ui/Button';

// for commonjs use,
// import Button from 'leaf-ui/cjs/Button';

const App = () => (
  <Button>
    Leaf-UI
  </Button>
);

export default App;

Supported Platforms

  • web
  • native
  • amp

Contribute

Read our contributing guide to learn about our development process, how to propose bugfixes and improvements, and how to build and test your changes to leaf-ui.

Setup

Follow this quick setup guide to get leaf-ui working on your local machine.