Floating UI
Plus

Web Components와 Vue에서 일관되게 동작하는, 제품에 바로 쓸 수 있는 인터페이스를 만드세요.

← 모든 패턴

Middleware

offset, shift, flip, size, arrow, hide, inline, auto-placement가 어떻게 협력하는지 봅니다.

실행 데모web-components
01

Offset

(DOC)

Compare the default position with a 10px gutter on the main axis.

0px
10px
offset(0) / offset(10)
02

Shift

(DOC)

Scroll horizontally. The panel stays on top and shifts along the x-axis to remain visible.

scroll horizontally
shift({padding: 8})
03

Flip

(DOC)

Scroll up. Flip chooses the available side while shift keeps the panel inside the boundary.

scroll up
bottom (default) + flip() → shift()
04

Arrow

(DOC)

Scroll horizontally. Floating UI Plus adds the arrow height to the requested visual gap.

scroll horizontally
offset(GAP) → shift() → arrow({element})
05

Size

(DOC)

Scroll vertically. Available height constrains the panel without adding a second popup scrollbar.

scroll vertically
Floating contentOneTwoThreeFourFive
size({apply: set maxWidth / maxHeight})
06

Auto placement

(DOC)

Scroll vertically. Auto placement chooses the roomiest side while shift keeps it inside the boundary.

scroll vertically
autoPlacement({padding: 8}) → shift({padding: 8})
07

Hide

(DOC)

Scroll up. The panel dims after escaping, then hides when its reference is fully clipped.

scroll up
Floating
State: attached
hide() + hide({strategy: 'escaped'})
08

Inline

(DOC)

Compare the detached bounding box with the relevant client rect of a wrapped inline anchor.

without

Text beforea reference that wraps over multiple linesafter.

with inline()

Text beforea reference that wraps over multiple linesafter.

inline() → offset(8)