Skip to content

Navbar topic update to 19 #1592

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: vnext
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 35 additions & 7 deletions doc/en/components/menus/navbar.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,11 @@ First, you need to the install the corresponding {ProductName} npm package by ru
npm install igniteui-react
```

You will then need to import the `Navbar`, its necessary CSS, and register its module, like so:
You will then need to import the `Navbar` and its necessary CSS like so:

```tsx
import { IgrNavbarModule, IgrNavbar } from 'igniteui-react';
import { IgrNavbar } from 'igniteui-react';
import 'igniteui-webcomponents/themes/light/bootstrap.css';

IgrNavbarModule.register();
```

<!-- end: React -->
Expand All @@ -92,11 +90,41 @@ Then in the template of `Navbar`, you can add the following code to show a basic
</IgrNavbar>
```

## Content
### Content

You can enhance the `Navbar` component by adding `Icon` or other components at the start or end position as content, allowing users to navigate to key positions directly from the bar:

```html
<igc-navbar>
<igc-icon name="home" slot="start"></igc-icon>
<h2>Sample App</h2>
<igc-icon name="search" slot="end"></igc-icon>
...
</igc-navbar>
```

```Razor
<IgbNavbar>
<IgbIcon @ref="@HomeIcon" slot="start" IconName="home" Collection="material" />
<h3>Sample App</h3>
<IgbIcon @ref="@SearchIcon" slot="end" IconName="search" Collection="material" />
...
</IgbNavbar>
```

You can added some `Icon` elements using the `Start` and `End` slots to the`Navbar` as it is shown in the following sample:
```tsx
<IgrNavbar>
<div slot="start">
<IgrIcon name="home" collection="material" />
</div>
<h2>Sample App</h2>
<div slot="end">
<IgrIcon name="search" collection="material" />
</div>
...
</IgrNavbar>

`sample="/menus/nav-bar/overview", height="100", alt="{Platform} Navbar Styling Example"`
```

## Styling

Expand Down