5.1.6 • Published 4 months ago

@react-md/app-bar v5.1.6

Weekly downloads
681
License
MIT
Repository
github
Last release
4 months ago

@react-md/app-bar

This package is used to create a top-level fixed app bar in your application to display some sort of navigation button like a hamburger menu, your app title and/or logo, as well as any top-level actions for your app. You can also use this component to create toolbars or other header elements for different sections of your app.

Installation

npm install --save @react-md/app-bar

It is generally recommended to also install the following packages since they work hand-in-hand with this package:

npm install --save @react-md/theme \
  @react-md/typography \
  @react-md/button \
  @react-md/icon

Documentation

You should check out the full documentation for live examples and more customization information, but an example usage is shown below.

Usage

The primary use of this package is to create a fixed header that includes your app's logo, title, mobile navigation, or common actions. Here's a quick example:

import { render } from "react-dom";
import {
  AppBar,
  AppBarTitle,
  AppBarNav,
  AppBarAction,
  APP_BAR_OFFSET_CLASSNAME,
} from "@react-md/app-bar";
import { MenuSVGIcon, SearchSVGIcon } from "@react-md/material-icons";

const App = () => {
  const mobile = window.innerWidth < 600;

  return (
    <>
      <AppBar id="main-app-bar" fixed>
        {mobile && (
          <AppBarNav id="main-mobile-navigation" aria-label="Mobile navigation">
            <MenuSVGIcon />
          </AppBarNav>
        )}
        {<AppBarTitle keyline={!mobile}>My Company's Name</AppBarTitle>}
        <AppBarAction id="search" aria-label="Search">
          <SearchSVGIcon />
        </AppBarAction>
      </AppBar>
      <main className={APP_BAR_OFFSET_CLASSNAME}>
        <h3>Hello, world!</h3>
      </main>
    </>
  );
};

render(<App />, document.getElementById("root"));
5.1.6

4 months ago

5.1.3

2 years ago

5.1.2

2 years ago

5.1.0

2 years ago

4.0.3

2 years ago

5.0.0

2 years ago

4.0.1

2 years ago

4.0.0

2 years ago

3.1.0

3 years ago

3.0.1

3 years ago

3.0.1-alpha.2

3 years ago

3.0.1-alpha.1

3 years ago

3.0.1-alpha.0

3 years ago

3.0.0

3 years ago

3.0.0-alpha.0

3 years ago

2.9.1

3 years ago

2.9.0

3 years ago

2.8.5

3 years ago

2.8.4

3 years ago

2.8.0

3 years ago

2.8.3

3 years ago

2.8.2

3 years ago

2.7.1

3 years ago

2.7.0

3 years ago

2.6.0

3 years ago

2.5.5

3 years ago

2.5.4

3 years ago

2.5.0

3 years ago

2.4.2

3 years ago

2.4.1

3 years ago

2.4.0

3 years ago

2.3.1

4 years ago

2.3.0

4 years ago

2.3.0-alpha.3

4 years ago

2.3.0-alpha.2

4 years ago

2.3.0-alpha.1

4 years ago

2.2.1

4 years ago

2.2.2

4 years ago

2.3.0-alpha.0

4 years ago

2.2.0

4 years ago

2.1.2

4 years ago

2.1.1

4 years ago

2.1.0

4 years ago

2.0.2

4 years ago

2.0.0

4 years ago

2.0.0-beta.2

4 years ago

2.0.0-beta.1

4 years ago

2.0.0-beta.0

4 years ago

2.0.0-alpha.15

4 years ago

2.0.0-alpha.14

4 years ago

2.0.0-alpha.13

4 years ago

2.0.0-alpha.12

4 years ago

2.0.0-alpha.11

4 years ago

2.0.0-alpha.10

4 years ago

2.0.0-alpha.9

5 years ago

2.0.0-alpha.8

5 years ago

2.0.0-alpha.7

5 years ago

2.0.0-alpha.6

5 years ago

2.0.0-alpha.5

5 years ago

2.0.0-alpha.4

5 years ago

2.0.0-alpha.3

5 years ago

2.0.0-alpha.1

5 years ago

2.0.0-alpha.0

5 years ago