How to get BottomSheet height? #9857
-
I have tabs and grid inside bottom sheet. Grid is 100% height and i need to make scrollable. In order to do that i need to add height to the content block. I see that bottom sheet has |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
Beta Was this translation helpful? Give feedback.
SheetDialog
maximum height is entire viewport minus offset from top that you've set when you opened it. It is available as CSS variable--tui-offset
. A rule of thumb — if CSS variable is prefixed as--t-
— it's private API, if it's prefixed as--tui-
— it means it's public and you can use it for your code, it's not going to change until major version where breaking changes are possible. You can then get the height using viewport size. On mobile viewport is dynamic due to address bar popping in and out, screen keyboard and other possible changes. If you need to account for that, instead of usingvh
units you can use variables listed in the lastSheetDialog
example, we update those intui-root