Import

import-popover.ts
import {
NuiHovercard,
NuiHovercardTrigger,
NuiPopover,
NuiPopoverTrigger,
} from '@needless-ui/angular/popover';

NuiPopover

A native popover placed next to the element that opened it.

Selector
[nuiPopover]
Exported as
nuiPopover
NuiPopover: Properties
NameTypeDefaultDescription
sideInput'top' | 'bottom' | 'start' | 'end''bottom'The side of the trigger it opens on. It flips when there is no room.
alignInput'start' | 'center' | 'end''start'How it lines up with the trigger along that side.
offsetInputnumber8Gap between the trigger and the panel, in pixels.
arrowInputbooleanfalseShows an arrow that points at the trigger.
enterInputNuiEnterHow it arrives: zoom, fade, drop, rise, unfold, flip, swing, slide or none.
motionInputNuiMotionThe spring it moves with: snappy, bouncy, jelly, elastic, lazy, mechanical or none.
springInputNuiSpringAny spring, as { stiffness, damping, mass }, compiled to CSS at runtime. It overrides motion.
cornersInputNuiCornersThe shape of its corners: round, squircle, bevel, scoop, notch or square.
radiusInputNuiRadiusHow big its corners are: none, small, medium, large or full.
densityInputNuiDensityHow much room it takes: compact, regular or roomy.
openChangeOutputbooleanEmits when it opens or closes.
showMethod(anchor: HTMLElement) => voidOpens it next to any element.
hideMethod() => voidCloses it.

Customization inputs you leave unset follow the nearest data-nui-* attribute. See the customization guide.

NuiPopoverTrigger

A button that opens and closes a popover, with the native popovertarget.

Selector
button[nuiPopoverTrigger]
NuiPopoverTrigger: Properties
NameTypeDefaultDescription
nuiPopoverTriggerInputNuiPopoverThe popover to open.

NuiHovercard

A rich tooltip that describes its trigger.

Selector
[nuiHovercard]
Exported as
nuiHovercard
NuiHovercard: Properties
NameTypeDefaultDescription
sideInput'top' | 'bottom' | 'start' | 'end''bottom'The side of the trigger it opens on. It flips when there is no room.
alignInput'start' | 'center' | 'end''start'How it lines up with the trigger along that side.
offsetInputnumber8Gap between the trigger and the card, in pixels.
arrowInputbooleanfalseShows an arrow that points at the trigger.
openDelayInputnumber500Milliseconds of hover before it opens. Keyboard focus opens it at once.
closeDelayInputnumber300Milliseconds before it closes, once the pointer has left.
enterInputNuiEnterHow it arrives: zoom, fade, drop, rise, unfold, flip, swing, slide or none.
motionInputNuiMotionThe spring it moves with: snappy, bouncy, jelly, elastic, lazy, mechanical or none.
springInputNuiSpringAny spring, as { stiffness, damping, mass }, compiled to CSS at runtime. It overrides motion.
cornersInputNuiCornersThe shape of its corners: round, squircle, bevel, scoop, notch or square.
radiusInputNuiRadiusHow big its corners are: none, small, medium, large or full.
densityInputNuiDensityHow much room it takes: compact, regular or roomy.
openChangeOutputbooleanEmits when it opens or closes.
showMethod(anchor: HTMLElement) => voidOpens it next to any element.
hideMethod() => voidCloses it.

Customization inputs you leave unset follow the nearest data-nui-* attribute. See the customization guide.

NuiHovercardTrigger

Shows a hovercard on hover and on keyboard focus, and makes it this element’s description.

Selector
[nuiHovercardTrigger]
NuiHovercardTrigger: Properties
NameTypeDefaultDescription
nuiHovercardTriggerInputNuiHovercardThe hovercard to show.