
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
An App Bar for React that stays out of your way.
When the scrolling is just right
Also known as a Header, a Navigation Bar, or a Navbar. I chose App Bar because it was available on npm.
Basic usage:
import React from 'react';
import { css } from 'emotion';
import Navigation from 'app-bar';
import { HamburgerMenu, Logo } from './components';
...
const styles = css`
background-color: white;
box-shadow: ${open ? 'none' : '0 1px 2px rgba(0, 0, 0, 0.08)'};
height: 64px;
`;
...
<Navigation className={styles} disabled={open}>
<Logo />
<HamburgerMenu open={open} />
</Navigation>
The app-bar
comes with very little defaults, and should be styled by supplying it with a className
property that is attached some CSS.
The <AppBar />
component is <div />
element with the following inline styles:
display: block;
position: sticky;
top: 0;
width: 100%;
In other words, <AppBar />
is a fixed full-width element that sticks to the top of your screen. The only functionality is that <AppBar />
will move out the viewport when scrolling down, and back in when scrolling up.
If you want to disable <AppBar />
's behaviour, supply the disabled
prop. When disabled, <AppBar />
will simply stick to the top of the screen.
If you need to access the dom element, you can supply a function via the innerRef
prop.
FAQs
An app bar for React that stays out of your way
The npm package app-bar receives a total of 4 weekly downloads. As such, app-bar popularity was classified as not popular.
We found that app-bar demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.