diff --git a/docs/components/popover.md b/docs/components/popover.md index 2803712773..3daba7a81b 100644 --- a/docs/components/popover.md +++ b/docs/components/popover.md @@ -1,760 +1,566 @@ # Popover -**KPop** is a popover component that is used when you need something with more detailed content then fits inside a tooltip. KPop has three slots; only two is necessary is to be filled to populate the component with content. The title prop must be passed in and the main slot and the content slot must be populated in for the popover to display anything. +KPop is a popover component that comes in handy when you need to display more content than can fit in a tooltip. -For example a button: - - - button - - + + + + + + ```html - - button + + ``` +:::tip NOTE +Check out [KTooltip](/components/tooltip) if you're looking for a component for showing tooltips. KPop is ideal for displaying more complex popover dialogs that might need to have interactive elements. +::: + ## Props ### buttonText -This is the text that will be displayed on the button that triggers the popover if not using -the default slot. +Popover trigger button text. If you want to use your custom element as a popover trigger, check out the [`default` slot](#default). - + ```html - + ``` -### target +### title -This is the target `element` that the popover is appended to. By default its the body tag. +Popover container title. Can also be [slotted](#title-1). - - button + ```html - - button + ``` -### tag +### placement -This is the tag that the popover is wrapped around. By default its the div tag. +Placement of the popover. -```html - - button - - -``` +Accepted values are: +
    +
  • + {{ placement }} {{ placement === 'auto' ? '(default)' : '' }} +
  • +
- - button +
+ + + +
+ +```html + +``` -### title +### trigger -This is the Title of the popover. Either this or the title slot needs to be filled. +Whether popover should be opened on trigger element click or mouseover. - - button +Accepted values are: +- `click` (default) +- `hover` + + ```html - - button + ``` -or alternatively, via the slot: +### popoverTimeout + +When [`trigger` prop](#trigger) is `hover`, you can provide a timeout for popover to wait before it closes. Default value is 300 milliseconds. - -