cschroeter / park-ui

Beautifully designed components built with Ark UI and Panda CSS that work with a variety of JS frameworks.
https://park-ui.com
MIT License
1.74k stars 75 forks source link

Floating UI components should set max height to --available-height #465

Open Southclaws opened 2 weeks ago

Southclaws commented 2 weeks ago

I've run into this a few times, and I think it could be a quick fix in Park's styles. Floating UI components such as Popover and Menu have --available-height set by Floating UI's hook, but the styles don't use them currently (as far as I can see) to ensure the component doesn't overflow the viewport and cause scroll bars to appear.

I think it's as simple as setting maxHeight: var(--available-height) on the Positioner anatomy of the relevant components.

If this makes sense, I can do a PR.