React component based on Semantic UI inline styles with auto and manual align popup position.
Install
npm i react-semantic-popup
or
yarn add react-semantic-popup
Use
import Popup from 'react-semantic-popup';
<Popup content='Text for popup'>
<div>
Some trigger element
</div>
</Popup>
Options
prop | value |
---|---|
content | [string or JSX]. Popup hint content. |
align | [string]. Custom hint position: "top left", "top center", "top right", "right center", "left center", "bottom left", "bottom center", "bottom right" |
inverted | [boolean] default: false. Inverted theme. |
click | [boolean] default: false. Trigger popup by clicking on children element. |
Example
<Popup content='Clicked' align='top right' inverted click>
Click me
</Popup>