Socket
Socket
Sign inDemoInstall

@asphalt-react/appbar

Package Overview
Dependencies
7
Maintainers
5
Versions
24
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @asphalt-react/appbar

Appbar


Version published
Weekly downloads
106
increased by39.47%
Maintainers
5
Install size
1.52 MB
Created
Weekly downloads
 

Readme

Source

Appbar

Appbar component is the main navigation bar for the whole application. Use this component at the root of your application as the top navigation bar. It is contructed using 3 sections:

  1. Navigation: Contains all the links for navigation. Links can be added using NavItem component.
  2. Header: Application logo can be added using the logo prop.
  3. Footer: Avatar can be used here for user profile and ActionList to add some extra actions. They can be passed using footer prop.

The styles required for the Appbar to stick to the top of the screen needs to be added while implementation.

Responsive

Appbar is completely responsive. All the navigation links switch to a collapsible screen (navigation drawer) and a hamburger button is added to interact with the drawer.

Usage

<Appbar>
  <NavItem tagProps={{ href: "/" }}>Home</NavItem>
  <NavItem tagProps={{ href: "/profile" }}>Profile</NavItem>
</Appbar>

Props

children

NavItems for Appbar

typerequireddefault
nodefalseN/A

React node for the logo.

<Appbar logo={<Logo />}
typerequireddefault
nodefalseN/A

React node for the footer section. Avatar, Actionlist, etc can be added here

typerequireddefault
nodefalseN/A

NavItem

Using NavItem component, links can be added to the Appbar. By default, it renders an <a> tag but you can pass your custom element or React component using as prop. All the props related to the link should be passed in tagProps element.

⚠️ The NavItem component is different from the one in @asphalt-react/sidebar

Props

children

Caption for the link

typerequireddefault
stringtrueN/A

active

Adds styles for active link

typerequireddefault
boolfalseN/A

as

Element to be rendered for the link

typerequireddefault
elementTypefalse"a"

tagProps

props for the link element

typerequireddefault
objectfalse{ href: "#" }

Keywords

FAQs

Last updated on 02 Nov 2022

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc