react-nice-bubble
v1.1.1
Published
A customizable bubble for react which support transparent background and border.
Downloads
47
Maintainers
Readme
react-nice-bubble ·
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
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