ant-design/components/popover/index.en-US.md
2016-08-31 15:02:08 +08:00

30 lines
1.8 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
category: Components
type: Views
english: Popover
---
The floating card popped by clicking or hovering.
## When to use
A simple popup menu to provide extra information or operations.
Comparing with `Tooltip`, besides information `Popover` card can also provide action elements like links and buttons.
## API
| Param | Description | Type | Default value |
|-----------|------------------------------------------|---------------|--------|
| trigger | triggering mode: can be hover, focus, or click. | string | hover |
| placement | position of the cardoptional `top/left/right/bottom` `topLeft/topRight/bottomLeft/bottomRight` `leftTop/leftBottom/rightTop/rightBottom` | string | top |
| title | title of the card | React.Element | none |
| content | content of the card | React.Element | none |
| overlayClassName | class name of the card | string | none |
| overlayStyle | style of the card | object | none |
| visible | make the float card visible or not | boolean | false |
| onVisibleChange | callback of the visible attribute changed | function | none |
| getTooltipContainer | rendered to the root of the menu. Default rendered to the body dom. If gets any problem of the menu while scrolling. Try to make the root the dom scrolled, and make it position relative. [Sample](http://codepen.io/anon/pen/xVBOVQ?editors=001) | Function(triggerNode) | () => document.body |
| openClassName | class name of the trigger, using for highlighting the trigger while triggered | string | ant-popover-open |
| arrowPointAtCenter | whether arrow pointed at the center of target, supported after `antd@1.11+` | Boolean | `false` |