How to calculate height of app content area of AppShell #3588
-
Hi, Very nice component, loving it! I'm using AppShell with navbar, aside, and footer. Navbar and aside has built-in section with auto grow where I can put list of items in scroll area with ease. However, I'm wondering whether there is built-in support for putting scroll area in the app content area to avoid the browser vertical scroll bar. If not, I can put a scroll area in the app content, but is there a suggested apporach to calculate the height of the scroll area (excluding header and footer )? Thanks in advance. Samuel |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 4 replies
-
Try |
Beta Was this translation helpful? Give feedback.
-
If anyone sees this in the future, --mantine-header-height and --mantine-footer-height have been renamed to --app-shell-header-height and --app-shell-footer-height. |
Beta Was this translation helpful? Give feedback.
-
Glad I found this issue! Within ❌ <Center h="100%">
Doesn't work
</Center> ✅ <Center
h="calc(100vh - var(--app-shell-header-height, 0px) - var(--app-shell-footer-height, 0px) - var(--app-shell-padding) * 2)"
>
Does
</Center> |
Beta Was this translation helpful? Give feedback.
Try
<ScrollArea h="calc(100vh - var(--app-shell-header-height, 0px) - var(--app-shell-footer-height, 0px))" />