All Projects → blueberryapps → React Bluekit

blueberryapps / React Bluekit

Licence: mit
Automatically generating a component library from your React components (ES5, ES6, Typescript)

Programming Languages

javascript
184084 projects - #8 most used programming language
typescript
32286 projects

Projects that are alternatives of or similar to React Bluekit

Cp Design
A configurable Mobile UI Components(React hooks+Typescript+Scss)组件库
Stars: ✭ 465 (-29.33%)
Mutual labels:  react-components
Mobx React
React bindings for MobX
Stars: ✭ 4,814 (+631.61%)
Mutual labels:  react-components
Circuit Ui
SumUp's component library for the web
Stars: ✭ 625 (-5.02%)
Mutual labels:  react-components
Graphin
A React toolkit for graph visualization based on G6
Stars: ✭ 482 (-26.75%)
Mutual labels:  react-components
Figwheel Main
Figwheel Main provides tooling for developing ClojureScript applications
Stars: ✭ 514 (-21.88%)
Mutual labels:  tooling
React Chat Elements
Reactjs chat elements chat UI, react chat components
Stars: ✭ 565 (-14.13%)
Mutual labels:  react-components
Patternfly React
A set of React components for the PatternFly project.
Stars: ✭ 454 (-31%)
Mutual labels:  react-components
React Decoration
A collection of decorators for React Components
Stars: ✭ 641 (-2.58%)
Mutual labels:  react-components
React on rails
Integration of React + Webpack + Rails + rails/webpacker including server-side rendering of React, enabling a better developer experience and faster client performance.
Stars: ✭ 4,815 (+631.76%)
Mutual labels:  react-components
Rsuite
🧱 A suite of React components .
Stars: ✭ 6,344 (+864.13%)
Mutual labels:  react-components
React Spectrum
A collection of libraries and tools that help you build adaptive, accessible, and robust user experiences.
Stars: ✭ 5,876 (+793.01%)
Mutual labels:  react-components
Storybook Addon Material Ui
Addon for storybook wich wrap material-ui components into MuiThemeProvider. 📃 This helps and simplifies development of material-ui based components.
Stars: ✭ 513 (-22.04%)
Mutual labels:  react-components
React Foundation
Foundation as React components.
Stars: ✭ 573 (-12.92%)
Mutual labels:  react-components
Reactivesearch
Search UI components for React and Vue: powered by appbase.io / Elasticsearch
Stars: ✭ 4,531 (+588.6%)
Mutual labels:  react-components
React Vertical Timeline
Vertical timeline for React.js
Stars: ✭ 637 (-3.19%)
Mutual labels:  react-components
Reactochart
📈 React chart component library 📉
Stars: ✭ 459 (-30.24%)
Mutual labels:  react-components
Light Bootstrap Dashboard React
React version of Light Bootstrap Dashboard
Stars: ✭ 561 (-14.74%)
Mutual labels:  react-components
Nteract
📘 The interactive computing suite for you! ✨
Stars: ✭ 5,713 (+768.24%)
Mutual labels:  react-components
Pivotal Ui
Pivotal's design system & component library
Stars: ✭ 637 (-3.19%)
Mutual labels:  react-components
Cj Upload
Higher order React components for file uploading (with progress) react file upload
Stars: ✭ 589 (-10.49%)
Mutual labels:  react-components

React BlueKit CircleCI Dependency Status

BlueKit usage

BlueKit automatically generates a library from your React components with editable props and live preview.

Point BlueKit to folders with your React components and it will generate a library for you. You'll be able to browse through the components, tweak their props, and see the changes live. Furthermore, any changes that you make to your components' code will be reflected in the library.

DEMO here: http://bluekit.blueberry.io

Install

$ npm install --save react-bluekit

You can use BlueKit via npm script or gulp

Npm script

"scripts": {
  "bluekit": "bluekit --baseDir ./components --paths . --exclude \"./(Layout|StyledComponent).tsx\""
}

Gulpfile configuration

import createBlueKit from 'react-bluekit/lib/createBlueKit';

createBlueKit({
  // your directory where components are located
  baseDir: `${__dirname}/src/browser`,
  // relative paths from base dir where to look for components
  paths: ['./components/', './auth'],
  // relative paths from base dir of files or directories you want to exclude from indexing
  exclude: ['./components/Foo'],
  // set to true when providing simple components such as `export default function MyComponent() { <div>Hello</div> }`
  noSpecialReplacements: true
});

This will provide you with two gulp tasks: build-bluekit and watch-bluekit, which perform static analysis of your components.

You can setup the build of BlueKit on application start and then watch components for changes by editing the default task to:

// from gulp.task('default', ['server']); to:
gulp.task('default', ['build-bluekit', 'server', 'watch-bluekit']);

Do not forget to add it to build process (for example on stage or production):

gulp.task('build', ['build-bluekit', 'build-webpack']);
// make sure that component build is before webpack

It will be built when needed.

Add it to your project

Look at the example directory, you only need to add:

import BlueKit from 'react-bluekit';
import componentsIndex from '../componentsIndex';
import React, { Component } from 'react';

export default class PageWithBlueKit extends Component {
  render() {
    return (
      <BlueKit
        componentsIndex={componentsIndex}

        // display inline (not full page)
        inline

        // this name is used for bluekit local storage as namespace
        // it is optional
        name="MyProjectName"
      />
    );
  }
}

You can also pass children to BlueKit, which will be displayed above the search field (e.g. for themes or other stuff).

To add jsdoc descriptions see example example_components/Checkbox.react.js.

Typescript support

Bluekit automatically finds .tsx files and uses react-docgen-typescript parser for it.

BlueKit development

npm install
cd ./example
npm install
gulp
open http://localhost:3000

This will start the development server and then you can play with components in BlueKit.

Gulp tasks

# generate svg icons from src/icons directory
gulp svg-icon

# run unit tests
gulp ava

# run eslint
gulp eslint

Additional info

BlueKit automatically hides props that don’t affect the component’s look.

If you get some kind of weird error and BlueKit doesn't load at all, try to reset localStorage by running localStorage.clear();.

Made with love by

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].