Socket
Book a DemoInstallSign in
Socket

react-beautiful

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-beautiful

React Beautiful - Boost up your React components

2.4.0
latest
Source
npmnpm
Version published
Weekly downloads
46
-28.12%
Maintainers
1
Weekly downloads
 
Created
Source

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!.

FAQs

Package last updated on 23 Oct 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.