All Projects β†’ raphamorim β†’ reactsandbox

raphamorim / reactsandbox

Licence: other
Create a React Component Sandboxes based on compositions

Programming Languages

javascript
184084 projects - #8 most used programming language
CSS
56736 projects

Projects that are alternatives of or similar to reactsandbox

Matchbox
πŸ”₯ A react UI component library
Stars: ✭ 58 (+427.27%)
Mutual labels:  react-components, storybook
shared-react-components-example
An example of a mono-repository of shared React components libraries!
Stars: ✭ 85 (+672.73%)
Mutual labels:  react-components, storybook
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 (+4563.64%)
Mutual labels:  react-components, storybook
orfium-ictinus
This repo will include the building blocks to create the Orfium Parthenons to come ...
Stars: ✭ 20 (+81.82%)
Mutual labels:  react-components, storybook
Stardust
🎨Tiller Design System
Stars: ✭ 19 (+72.73%)
Mutual labels:  react-components, storybook
gypcrete
iCHEF web components library, built with React.
Stars: ✭ 28 (+154.55%)
Mutual labels:  react-components, storybook
React Rough
πŸ‡ React Components for Rough.js
Stars: ✭ 164 (+1390.91%)
Mutual labels:  react-components, storybook
lerna-starter
Simple React UI Development environment boilerplate to develop, test and publish your React components.
Stars: ✭ 55 (+400%)
Mutual labels:  react-components, storybook
fyndiq-ui
Library of reusable web frontend components for Fyndiq
Stars: ✭ 39 (+254.55%)
Mutual labels:  react-components, storybook
availity-react
React components using Availity UIKit and Bootstrap 4
Stars: ✭ 46 (+318.18%)
Mutual labels:  react-components, storybook
smores-react
🍭 Marshmallow React components
Stars: ✭ 34 (+209.09%)
Mutual labels:  react-components, storybook
art-ui
🌈 A UI Design Language and React UI library
Stars: ✭ 34 (+209.09%)
Mutual labels:  storybook
ripple
Ripple is the frontend framework for Single Digital Presence, delivered using Nuxt and Vue.js
Stars: ✭ 36 (+227.27%)
Mutual labels:  storybook
hitchstory
Type-safe, StrictYAML based BDD framework for python.
Stars: ✭ 24 (+118.18%)
Mutual labels:  documentation-tool
storybook-addon-html
A Storybook addon that extracts and displays compiled syntax-highlighted HTML
Stars: ✭ 61 (+454.55%)
Mutual labels:  storybook
storybook-addon-grid
⚜️ Column guides that help you align your stories
Stars: ✭ 17 (+54.55%)
Mutual labels:  storybook
react-gridforms
React components for Gridforms form layout
Stars: ✭ 29 (+163.64%)
Mutual labels:  react-components
react-enterprise-starter-kit
Highly Scalable Awesome React Starter Kit for an enterprise application with a very easy maintainable codebase. πŸ”₯
Stars: ✭ 55 (+400%)
Mutual labels:  storybook
communication-ui-library
UI Library for Azure Communication Services helps developers build communication applications with ease. From turn-key composites to UI components that can be composited together.
Stars: ✭ 44 (+300%)
Mutual labels:  storybook
SandboxJS
Safe eval runtime
Stars: ✭ 18 (+63.64%)
Mutual labels:  sandbox

reactsandbox

CircleCI

Create a React Component Sandbox based on compositions

Integrate Live documentation on real-world React components.

Reasons to use reactsandbox:

  • Fully Hackable (you can change everthing or create your own style, see available CSS classes).

  • You can use with any Builder (Webpack, Rollup, Browserify, Parcel...). Because reactsanbox is only a HOC.

  • Easy to add on existent component and fast update on documentation, it can be used with PropTypes or Types.

  • Lightweight ~3.6K gzip.

Example

Installing

yarn add reactsandbox

Example

Book.js

import React from 'react'
import withSandbox, { Types } from 'reactsandbox'

// you can import styles or create your own
import 'reactsandbox/styles/default-theme.css'

const Book = ({title, author, year, transparent, renderCover}) =>
  <div className={`book ${(transparent)? 'transparent' : ''}`}>
    <div className='cover'>{renderCover}</div>
    <div className='info'>
      <div className='title'>{title}</div>
      <div className='author'>{author}</div>
      <div className='year'>{year}</div>
    </div>
  </div>

// Compose Sandbox for Book Component
const BookSandbox = withSandbox(Book, {
  transparent: Types.Boolean(false, 'Set Book Card as Transparent'),
  title: Types.String('My Book Name', 'Description of Title'),
  author: Types.String('John Doe', 'Description of Author'),
  year: Types.Number(1995, 'Year of Publication'),
  renderCover: Types.ReactElement('<img src="book-cover.jpg"/>', 'Render ReactElement as Cover Book')
})

export default Book
export BookSandbox // export Component Sandbox either

See Demo

Types

Note that Type is a custom object, then you can create your own.

Custom Types

Boolean

Returns Type object from Boolean.

default value: false

Types.Boolean(false, 'prop description')

String

Returns Type object from String.

default value: ''

Types.String('prop value', 'prop description')

Number

Returns Type object from Number.

default value: 0

Types.String(100, 'prop description')

ReactElement (not stable, experimental)

Returns Type object from ReactElement.

default value: null

Types.ReactElement('<img src="source-to-my-image.png"/>', 'prop description')
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].