App Bar
The App Bar displays information and actions relating to the current screen.
The top App Bar provides content and actions related to the current screen. It’s used for branding, screen titles, navigation, and actions.
It can transform into a contextual action bar or used as a navbar.
App Bar with buttons
useScrollTrigger([options]) => trigger
Arguments
options
(Object [optional]):options.disableHysteresis
(Boolean [optional]): Defaults tofalse
. Disable the hysteresis. Ignore the scroll direction when determining thetrigger
value.options.target
(Node [optional]): Defaults towindow
.options.threshold
(Number [optional]): Defaults to100
. Change thetrigger
value when the vertical scroll strictly crosses this threshold (exclusive).
Returns
trigger
: Does the scroll position match the criteria?
Examples
import useScrollTrigger from '@material-ui/core/useScrollTrigger';
function HideOnScroll(props) {
const trigger = useScrollTrigger();
return (
<Slide in={!trigger}>
<div>Hello</div>
</Slide>
);
}