2.4.0 • Published 5 years ago

react-beautiful v2.4.0

Weekly downloads
26
License
ISC
Repository
github
Last release
5 years ago

React Beautiful - Boost up your React components

This project create new React components and add some useful feature to Material components without touch the core base components.

#Demo If you want try the components, you can see the demo on official website! I'm working on live demo based on Storybook, give me little more time :)

Installation

React beautiful is available as an npm package.

// With npm
npm install react-beautiful

// With yarn
yarn add react-beautiful

Usage

You can use destructuring or tree shaking approach. Here is a quick example to get you started, it's all you need:

import React from 'react';
import ReactDOM from 'react-dom';
import { Dialog, Image } from 'react-beautiful';

function App() {
  return (
    <React.Fragment>
      <Image height={180} src="http://..." grayed />
      <Dialog
        open
        title="Custom title"
        description="Custom description"
        showClose
      />
    </React.Fragment>
  );
}

ReactDOM.render(<App />, document.querySelector('#app'));

Components

React Beautiful have several components:

Dialog

You can use all Material Dialog props, but you can pass other props for render a complete Dialog component without include many others components like DialogContent, DialogContentText and so on. Moreover: this component enable full screen mode automatically for small screen (thanks to withMobileDialog Material HOC) and provide an icon button for close the Dialog. The props are:

PropertyTypeDescription
titlestring or nodeSet Dialog title by DialogTitle component
titleClassNamestringSet Dialog title class name
descriptionstring or nodeSet Dialog description by DialogContentText component
descriptionClassNamestringSet Dialog description class name
footerstring or nodeSet Dialog footer by DialogActions component. Accept string or node.
footerClassNamestringSet Dialog description class name
showClosebooleanCreate a close icon by Fab component. Require onClose prop function

See the demo!.

Image

Image component is an easy and useful component for create a responsive image box with optionally grayed filter. The component's props are:

PropertyTypeDescription
heightnumberSet image height
srcstringSet image url like src attribute on img html tag
grayedbooleanSet gray filter. The filter will be remove on hover/focus
persistentbooleanYou can remove the responsive behaviour with this prop

See the demo!.

Snackbar

Snackbar component accept all Material Snackbar props, but you can pass other props for render a complete Snackbar component:

PropertyTypeDescription
variantstring success or failSet Snackbar style
showClosebooleanShow a close icon by IconButton component. Require onClose prop function

See the demo!.

Highlight Card

Highlight Card component is a horizontal card with all you need to show a consistent and clear card. The component's props are:

PropertyTypeDescription
classNamestringSet card className
primaryColorstringSet primary card background color
secondaryColorstringSet secondary card background color
iconnodeSet card icon on left side
valuestring or nodeSet card value on the right side
labelstring or nodeSet label value on the right side
sizeone of large, normal (default) or smallSet size card and change value and label font size if you passed strings for them

See the demo!.

2.4.0

5 years ago

2.3.0

5 years ago

2.2.0

5 years ago

2.1.1

5 years ago

2.1.0

5 years ago

2.0.1

5 years ago

2.0.0

5 years ago

1.11.1

5 years ago

1.11.0

5 years ago

1.10.4

5 years ago

1.10.3

5 years ago

1.10.2

5 years ago

1.10.1

5 years ago

1.10.0

5 years ago

1.9.0

5 years ago

1.8.1

5 years ago

1.8.0

5 years ago

1.7.3

5 years ago

1.7.2

5 years ago

1.7.1

5 years ago

1.7.0

5 years ago

1.6.0

5 years ago