ui/position_helpers.ts

CSS position calculation helpers for popovers and floating UI elements.

Declarations
#

4 declarations

view source

Alignment
#

CardinalPosition
#

generate_position_styles
#

ui/position_helpers.ts view source

(position?: Position, align?: Alignment, offset?: string): Record<string, string>

Generates CSS positioning styles for UI elements.

position

where to position the element ('left', 'right', etc.)

default 'center'

align

alignment along the position edge ('start', 'center', 'end')

default 'center'

offset

distance from the position (CSS value)

type string
default '0'

returns

Record<string, string>

CSS styles as a Record

Position
#

Imported by
#