Miss any of our Open RFC calls?Watch the recordings here! »

react-nice-bubble

1.1.1 • Public • Published

react-nice-bubble · GitHub license npm version

The powerful bubble component for React which support transparent background and border.

key features

  • support background color with alpha.
  • support border color with alpha.
  • support custom border width.
  • support custom border radius.
  • support custom border color.
  • support custom background color.
  • support custom bubble width.
  • support custom bubble height.
  • support 12 arrow position.
  • support custom arrow shape.
  • support box-sizing.

Installation

Using npm:

$ npm install --save react-nice-bubble

Demo

storybook

Example

import React from 'react';
import Bubble, { BoxSizing, Position } from 'react-nice-bubble';
 
const App = (
  <Bubble
     width={300}
     height={300}
     arrowSize={16}
     arrowDegree0={45}
     arrowDegree1={45}
     arrowOffset={16}
     position={Position.TOP_LEFT}
     borderWidth={1}
     borderColor="black"
     borderRadius={0}
     boxSizing={BoxSizing.CONTENT_BOX}
     backgroundColor="white"
  >
     Hello world!
  </Bubble>
);
 
const root = document.getElementById('root');
ReactDOM.render(<App />, root);
 

Props

WIP

Install

npm i react-nice-bubble

DownloadsWeekly Downloads

3

Version

1.1.1

License

MIT

Unpacked Size

34.8 kB

Total Files

6

Last publish

Collaborators

  • avatar