DEV Community

artemismars
artemismars

Posted on

useScrollTrigger in MUI

Link
https://mui.com/components/app-bar/#elevate-app-bar

codes

import useScrollTrigger from '@mui/material/useScrollTrigger';
Enter fullscreen mode Exit fullscreen mode

Preview

Issues

  1. I found this useScrollTrigger function and made the navbar elevated through the webpage when scrolling down. But I don't use what this function does exactly in the code. The MUI document doesn't provide any information about this function too.

Top comments (0)