Skip to content

How to get BottomSheet height? #9857

Discussion options

You must be logged in to vote

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 using vh units you can use variables listed in the last SheetDialog example, we update those in tui-root

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by waterplea
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants