Popover
Popovers are useful for conveying information when an user clicks an element.
Basic Example
Wrap the trigger element (such as an <i-button>) and provide a <template #body> inside an <i-popover> component to create a popover.
Optionally, you can provide a popover header and footer using slots.
Placement
Trigger popovers at the top, bottom, left or right of elements by using the placement property.
Each position also has a -start or -end variant that sets the popover to the start or end of the placement instead of centering it. The possible placements are:
toptop-starttop-endbottombottom-startbottom-endleftleft-startleft-endrightright-startright-end
Trigger Type
You can use the trigger property to trigger the popover on hover or click. By default, popovers are triggered on hover, a design decision made to improve user experience.
Size Variants
You’re able to use the size property to control the size of your popovers, using one of the available sizes: sm, md, and lg. The default size is set to md.
Color Variants
You can choose a light or dark color for your popover using the color modifier.
Configuration
Props
Use props to modify the component’s design and behavior.
- Property
colorType'light' | 'dark'Default'light'Description The color variant of the popover - Property
disabledTypeBooleanDefaultfalseDescription The disabled state of the popover - Property
modelValueTypeBooleanDefaultfalseDescription Used to manually control the visibility of the popover - Property
nameTypeStringDefaultuid()Description The identifier of the popover - Property
arrowTypeBooleanDefaulttrueDescription Displays an arrow on the popover pointing to the trigger element - Property
placementType'top' | top-start | top-end | 'bottom' | bottom-start | bottom-end | 'left' | left-start | left-end | 'right' | right-start | right-endDefaultfalseDescription The placement of the popover - Property
triggerType'hover' | 'focus' | 'click' | 'manual'Default'click'Description The events used to trigger the popover - Property
offsetTypeNumberDefault6Description The offset of the popover relative to the trigger element - Property
popperOptionsTypeObjectDefault''Description Used to override the popper.js options used for creating the popover - Property
sizeType'sm' | 'md' | 'lg'Default'md'Description The size variant of the popover
Slots
Use slots to insert custom content into well-defined component locations.
- Property
defaultDescription Slot for tooltip trigger - Property
headerDescription Slot for tooltip header content - Property
bodyDescription Slot for tooltip body content - Property
footerDescription Slot for tooltip footer content
Events
Use events to react to something happening inside the component.
- Property
update:modelValueDescription Event emitted for setting the modelValue
CSS Variables
Read more about configuring Inkline’s Design System variables to update the look and feel of the component.
- Property
----backgroundValuecolor('white')Description The background of the popover component - Property
----border-top-colorValuecolor('light')Description The border top color of the popover component - Property
----border-right-colorValuecolor('light')Description The border right color of the popover component - Property
----border-bottom-colorValuecolor('light')Description The border bottom color of the popover component - Property
----border-left-colorValuecolor('light')Description The border left color of the popover component - Property
----border-colorValuevar(----border-top-color) var(----border-right-color) var(----border-bottom-color) var(----border-left-color)Description The border color of the popover component - Property
----border-styleValuevar(--border-style)Description The border style of the popover component - Property
----border-top-widthValuevar(--border-top-width)Description The border top width of the popover component - Property
----border-right-widthValuevar(--border-right-width)Description The border right width of the popover component - Property
----border-bottom-widthValuevar(--border-bottom-width)Description The border bottom width of the popover component - Property
----border-left-widthValuevar(--border-left-width)Description The border left width of the popover component - Property
----border-widthValuevar(----border-top-width) var(----border-right-width) var(----border-bottom-width) var(----border-left-width)Description The border width of the popover component - Property
----border-top-left-radiusValuevar(--border-top-left-radius)Description The border top left radius of the popover component - Property
----border-top-right-radiusValuevar(--border-top-right-radius)Description The border top right radius of the popover component - Property
----border-bottom-right-radiusValuevar(--border-bottom-right-radius)Description The border bottom right radius of the popover component - Property
----border-bottom-left-radiusValuevar(--border-bottom-left-radius)Description The border bottom left radius of the popover component - Property
----border-radiusValuevar(----border-top-left-radius) var(----border-top-right-radius) var(----border-bottom-right-radius) var(----border-bottom-left-radius)Description The border radius of the popover component - Property
----box-shadow-offset-xValuevar(--box-shadow-offset-x)Description The box shadow horizontal offset of the popover component - Property
----box-shadow-offset-yValuevar(--box-shadow-offset-y)Description The box shadow vertical offset of the popover component - Property
----box-shadow-blur-radiusValuevar(--box-shadow-blur-radius)Description The box shadow blur radius of the popover component - Property
----box-shadow-spread-radiusValuevar(--box-shadow-spread-radius)Description The box shadow spread radius of the popover component - Property
----box-shadow-colorValuevar(--box-shadow-color)Description The box shadow spread radius of the popover component - Property
----box-shadowValuevar(----box-shadow-offset-x) var(----box-shadow-offset-y) var(----box-shadow-blur-radius) var(----box-shadow-spread-radius) var(----box-shadow-color)Description The box shadow of the popover component - Property
----colorValuecontrast-color($color-white)Description The color of the popover component item - Property
----font-sizeValuefont-size()Description The font size of the popover component - Property
----font-weightValuefont-weight('normal')Description The font weight of the popover component - Property
----line-heightValuevar(--line-height)Description The line height of the popover component - Property
----margin-topValuecalc(var(--margin-top) / 2)Description The margin top of the popover component - Property
----margin-rightValuecalc(var(--margin-right) / 2)Description The margin right of the popover component - Property
----margin-bottomValuecalc(var(--margin-bottom) / 2)Description The margin bottom of the popover component - Property
----margin-leftValuecalc(var(--margin-left) / 2)Description The margin left of the popover component - Property
----marginValuevar(----margin-top) var(----margin-right) var(----margin-bottom) var(----margin-left)Description The margin of the popover component - Property
----padding-topValuecalc(var(--padding-top) * 3 / 4)Description The padding top of the popover component - Property
----padding-rightValuevar(--padding-right)Description The padding right of the popover component - Property
----padding-bottomValuecalc(var(--padding-bottom) * 3 / 4)Description The padding bottom of the popover component - Property
----padding-leftValuevar(--padding-left)Description The padding left of the popover component - Property
----paddingValuevar(----padding-top) var(----padding-right) var(----padding-bottom) var(----padding-left)Description The padding of the popover component - Property
----max-widthValue90vwDescription The maximum width of the popover component - Property
----widthValue280pxDescription The width of the popover component - Property
----z-indexValue2000Description The z-index of the popover component - Property
----header--backgroundValuecolor('gray-05')Description The background of the popover component header - Property
----header--border-colorValuevar(----border-color)Description The border color of the popover component header - Property
----header--border-styleValuevar(----border-style)Description The border style of the popover component header - Property
----header--border-top-widthValuevar(----border-top-width)Description The border top width of the popover component header - Property
----header--border-right-widthValuevar(----border-right-width)Description The border right width of the popover component header - Property
----header--border-bottom-widthValuevar(----border-bottom-width)Description The border bottom width of the popover component header - Property
----header--border-left-widthValuevar(----border-left-width)Description The border left width of the popover component header - Property
----header--border-widthValuevar(----header--border-top-width) var(----header--border-right-width) var(----header--border-bottom-width) var(----header--border-left-width)Description The border width of the popover component header - Property
----header--colorValuevar(----color)Description The color of the popover component header - Property
----header--padding-topValuevar(----padding-top)Description The padding top of the popover component header - Property
----header--padding-rightValuevar(----padding-right)Description The padding right of the popover component header - Property
----header--padding-bottomValuevar(----padding-bottom)Description The padding bottom of the popover component header - Property
----header--padding-leftValuevar(----padding-left)Description The padding left of the popover component header - Property
----header--paddingValuevar(----header--padding-top) var(----header--padding-right) var(----header--padding-bottom) var(----header--padding-left)Description The padding of the popover component header - Property
----body--backgroundValuevar(----background)Description The background of the popover component body - Property
----body--border-colorValuevar(----border-color)Description The border color of the popover component body - Property
----body--border-styleValuevar(----border-style)Description The border style of the popover component body - Property
----body--border-top-widthValuevar(----border-top-width)Description The border top width of the popover component body - Property
----body--border-right-widthValuevar(----border-right-width)Description The border right width of the popover component body - Property
----body--border-bottom-widthValuevar(----border-bottom-width)Description The border bottom width of the popover component body - Property
----body--border-left-widthValuevar(----border-left-width)Description The border left width of the popover component body - Property
----body--border-widthValuevar(----body--border-top-width) var(----body--border-right-width) var(----body--border-bottom-width) var(----body--border-left-width)Description The border width of the popover component body - Property
----body--colorValuevar(----color)Description The color of the popover component body - Property
----body--padding-topValuevar(----padding-top)Description The padding top of the popover component body - Property
----body--padding-rightValuevar(----padding-right)Description The padding right of the popover component body - Property
----body--padding-bottomValuevar(----padding-bottom)Description The padding bottom of the popover component body - Property
----body--padding-leftValuevar(----padding-left)Description The padding left of the popover component body - Property
----body--paddingValuevar(----body--padding-top) var(----body--padding-right) var(----body--padding-bottom) var(----body--padding-left)Description The padding of the popover component body - Property
----footer--backgroundValuecolor('gray-05')Description The background of the popover component footer - Property
----footer--border-colorValuevar(----border-color)Description The border color of the popover component footer - Property
----footer--border-styleValuevar(----border-style)Description The border style of the popover component footer - Property
----footer--border-top-widthValuevar(----border-top-width)Description The border top width of the popover component footer - Property
----footer--border-right-widthValuevar(----border-right-width)Description The border right width of the popover component footer - Property
----footer--border-bottom-widthValuevar(----border-bottom-width)Description The border bottom width of the popover component footer - Property
----footer--border-left-widthValuevar(----border-left-width)Description The border left width of the popover component footer - Property
----footer--border-widthValuevar(----footer--border-top-width) var(----footer--border-right-width) var(----footer--border-bottom-width) var(----footer--border-left-width)Description The border width of the popover component footer - Property
----footer--colorValuevar(----color)Description The color of the popover component footer - Property
----footer--padding-topValuevar(----padding-top)Description The padding top of the popover component footer - Property
----footer--padding-rightValuevar(----padding-right)Description The padding right of the popover component footer - Property
----footer--padding-bottomValuevar(----padding-bottom)Description The padding bottom of the popover component footer - Property
----footer--padding-leftValuevar(----padding-left)Description The padding left of the popover component footer - Property
----footer--paddingValuevar(----footer--padding-top) var(----footer--padding-right) var(----footer--padding-bottom) var(----footer--padding-left)Description The padding of the popover component footer