@rakuten-rex/react-component-starter-kit
v3.6.1
Published
ReX React UI Component
Downloads
7
Readme
ReX React UI Component: react-component-starter-kit
This project is part of ReX Design System and it can be used to create UI Components compatible with:
React, HTML/CSS
How to install
npm install @rakuten-rex/[email protected] --save
yarn add @rakuten-rex/[email protected]
Getting started
Storybook Live examples
For a complete guide of properties for React and HTML classes please visit our Storybook page:
https://rakuten-rex.github.io/react-component-starter-kit/
Storybook features
- [x] Stories by component types
- [x] HTML raw output
- [x] JSX output
- [x] Stories source code
- [x] Knobs with multiple options
How to integrate ReX in your project
A) JavaScript modules
React component (JavaScript + CSS Styles)
For plug and play components integration.
Example:
my-component.jsx
import MyComponent from '@rakuten-rex/react-component-starter-kit';
function MyCustomComponent() {
return (
<MyComponent />
);
}
Click here to see all working examples in Storybook.
CSS Styles only
For your own JavaScript integration (React, Vue, Angular, etc.) or Static HTML.
Using CSS Variables (Modern Websites and WebApps)
Example:
my-component.jsx
import '@rakuten-rex/react-component-starter-kit/MyComponent/css';
function MyCustomComponent() {
return (
<div class="rex-my-component" role="presentation">
<img src="static/media/Image.jpg" alt="Basic example" style="width:100%" />
<h3>Hello World</h3>
<p>This is a basic example for ReX React Components Starter Kit</p>
</div>
);
}
Documentation, source code and distribution
|| Site | URL | |-------------| ------------- | ------------- | || Github (Source Code) | https://github.com/rakuten-rex | || NPM (Package distribution) | https://www.npmjs.com/org/rakuten-rex |
Project Stack
| Front-end | |-------------| | HTML5 CSS3 & Sass JavaScript ES6 React |
| Tools | |-------------| | webpack Storybook Babel ESLint Prettier |
Features
| Styles features | JavaScript features |
|-------------|-------------|
| Theme support via CSS variables | React components splitted by type |
| Universal Module Definition support |
| Sass mixins for custom builds |
| Reset CSS styles already bundled by HTML tags |
| Removed duplicated CSS props |
| CSS classes prefix rex-
|
Browser Support
| PC | Mobile |-------------|-------------| | Chrome 49+ | iOS 9+ (Safari 9.3+, Chrome 78+) | | Safari 9.1+ | Android 6+ (Chrome 78+, Android Browser 76+) | | Firefox 31+ | | | MS Edge 15+ | | | IE 11+ | |