Navbar

Documentation for the <Navbar /> component. Learn about the available props and how to use it.

Installation

To get started, install @exponentialeducation/betomic via yarn:

# Yarn
yarn add @exponentialeducation/betomic

Basic Example

Navbars are built using the Navbar and Navbar.Brand components.

{/* ... */}
import { Navbar } from "@exponentialeducation/betomic";
function IndexPage() {
return (
<main>
{/* ... */}
<Navbar>
Default navbar
</Navbar>
{/* ... */}
</main>
)
}

Default navbar

With shadow

You can add a shadow style, passing shadow prop:

{/* ... */}
import { Navbar } from "@exponentialeducation/betomic";
function IndexPage() {
return (
<main>
{/* ... */}
<Navbar shadow>
Default navbar
</Navbar>
{/* ... */}
</main>
)
}

Default navbar

Brand

If you want to render a BEDU logo, you can use a Navbar.Brand component and add it inside.

{/* ... */}
import { Navbar } from "@exponentialeducation/betomic";
function IndexPage() {
return (
<main>
{/* ... */}
<Navbar shadow>
<Navbar.Brand>
<svg />
</Navbar.Brand>
</Navbar>
{/* ... */}
</main>
)
}

Change background

If you want to change the background styles you should pass a valid classes.

{/* ... */}
import { Navbar } from "@exponentialeducation/betomic";
function IndexPage() {
return (
<main>
{/* ... */}
<Navbar className="bg-surface-800">
<Navbar.Brand>
<svg />
</Navbar.Brand>
</Navbar>
{/* ... */}
</main>
)
}

Size

Two sizes are available.

{/* ... */}
import { Navbar } from "@exponentialeducation/betomic";
function IndexPage() {
return (
<main>
{/* ... */}
<Navbar size="sm" shadow>
<Navbar.Brand>
<svg />
</Navbar.Brand>
</Navbar>
{/* ... */}
</main>
)
}

Props

Navbar

Main component

prop

description

children

node Content will be render

className?

string List of class names to pass along to a Navbar component.

fixedToTop?

boolean = false Apply a fixed styles

shadow?

boolean = false Apply a shadow style

size?

sm | lg = lg Apply a padding top and bottom style

Navbar.Brand

prop

description

children?

node Content will be render