svecosystem / paneforge

Resizable pane components for Svelte.
https://paneforge.com
MIT License
370 stars 3 forks source link

Possible to add a `data-pane-collapsed` attribute? #32

Open nooblyf opened 2 months ago

nooblyf commented 2 months ago

Describe the feature in detail (code, mocks, or screenshots encouraged)

Because it is very complex to do collapsed size in pixels from what i see from the previous issues, I am trying to set the max height/width of a collapsed pane.

I know it's possible to do this with a state and using the pane API, but it would be really handy to have a data attribute giving out this information because then we'll be able to do it just like this

data-[pane-collapsed]:max-w-[48px]

data-[pane-expanded]:max-w-none

What type of pull request would this be?

Enhancement

Provide relevant links or additional information.

No response

huntabyte commented 2 months ago

This is a good idea!