Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@winme/react-popover

WinmezzZ3MIT1.1.3TypeScript support: included

A popover component with react.

tooltip, popover, react-tooltip, react-popover

readme

react-popover

A <Popover> component for react.

Features

  • React Hooks: ✅
  • TypeScript
  • Server Render
  • Lazy Render: ✅
  • Theme: ✅
  • Configurable: ✅

Install

$ yarn add @winme/react-popover

Usage

import Popover from '@winme/react-popover'
import '@winme/react-popover/dist/index.css'

export default function App() {
  return (
    <Popover content="some message">
      <span>Click</span>
    </Popover>
  )
}

Props

Prop Type Required Default Description
theme string false light color theme. one of ['light', 'dark']
trigger string false hover trigger popover method. one of ['hover', 'click']
position string false bottomLeft how position the popover. one of ['topLeft', 'top', 'topRight', 'rightTop', 'right', 'rightBottom', 'bottomRight', 'bottom', 'bottomLeft', 'leftBottom', 'left', 'leftTop']
content ReactNode true | popover content
children ReactNode true | popover reference

Contributing

We very much welcome your contribution, you can build together with us in the following ways 😃

  • Use Ant Design Pro in your daily work.
  • Submit GitHub issues to report bugs or ask questions.
  • Propose Pull Request to improve our code.

License

react-popover is released under the MIT license.