How To Customize The React Navbar With Your Brand Info
Tags: tutorial, react, webdev, superflows
Published: 2022-11-04 06:47:32

## Introduction

Inserting your brand information in the navigation bar helps build your brand recall throughout your website. This article shows you how to do it in your React project.

<br />

## Prerequisites

This article assumes that you have gone through the steps of the [previous tutorial](https://dev.to/superflowsdev/how-to-get-started-with-a-navigation-bar-in-your-react-project-in-2-mins-3mo9), installed the Superflows library and have the default navigation bar up and running. This tutorial takes it forward from there.

<br />

## Brand Info

Brand information consists of mainly two things:
- Brand name
- Brand logo

Either of these or both of these, depending on your design requirements and guidelines, need to be inserted into the navigation bar.

<br />

## Step 1 - Set Brand Name

Brand name can be set by passing a string to the brand prop. As show below:

```
  
return (
  <div>
    <SfNav brand="Your Brand"/>
  </div>
);

```
It renders as follows:

![Brand name desktop](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kh5szxo2jqg4zadx54tv.png)

![Brand name mobile](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tzylotidcuh48hrxup1d.png)

<br />

## Step 2 - Set Brand Logo

Brand logo can be set by passing the url string of the logo to the brandLogo prop. As show below:

```
  
return (
  <div>
    <SfNav brandLogo="https://superflows.dev/img/superflows_gray_transparent_200.png"/>
  </div>
);

```

It renders as follows:

![Brand logo desktop](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dcqw8j6i5zx2nkqkdraf.png)

![Brand logo mobile](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6mf0wsdaddwsrdj1ff55.png)

Needless to say, you can also show both, as follows:

```
return (
  <div>
    <SfNav brand="Your Brand" brandLogo="https://superflows.dev/img/superflows_gray_transparent_200.png"/>
  </div>
);

```

![Brand name logo desktop](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/a84dl46vni8y1rg0h482.png)

![Brand name logo mobile](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/eqa1qw69cxqweoklehng.png)

<br />

## Step 3 - Styling

You can then customise the look and feel, by using inline css or by class names. The Superflows navigation bar exposes props that facilitate customisation. An example is shown below:

```
return (
  <div>
    <SfNav 
      brand="Your Brand"
      brandLogo="https://superflows.dev/img/superflows_gray_transparent_200.png" 
      stylesBrand={{
                        color: 'black',
                        textShadow: '1px 2px 2px gray'
                    }}
      stylesBrandLogo={{
                        backgroundColor: 'white', 
                        borderRadius: '10px', 
                        paddingRight: '0px', 
                        marginRight: '10px', 
                        border: 'solid 1px black'
    }}/>
  </div>
);

```

It renders as follows:

![Brand customize desktop](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f8b20txeevkjx0hel1g4.png)

![Brand customize mobile](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/x3drm10ewyugbt87dr4x.png)

<br />

## Reference Links

- [Code](https://stackblitz.com/edit/react-ts-z2efwv?file=App.tsx)
- [Documentation](https://superflows.dev/docs/building-blocks/nav)

<br />

## Video Tutorial

{% youtube cT9g195G59Q %}

<br />

## Further Reading

You have already seen how to get started with the navigation bar and how to insert brand information into it. The next tutorial will show you how to customise the main menu.

<br />

## Conclusion

This article shows you how to insert your brand information in your React navigation bar. It also shows you how you can tweak the look and feel of the brand information to suit your needs and designs.