Nav Tabs
The NavTabs component represents the main navigation dock for an application on a mobile device, including up to 5 tabs or buttons for different sections. The component has a fixed position on the bottom of the screen.
import React from "react";
import { NavTabs } from "@nimbus-ds/patterns";
import { HomeIcon, MenuIcon, MoneyIcon, TagIcon } from "@nimbus-ds/icons";
const Example: React.FC = () => {
const handleClick = () => {
console.log("Tapped item");
};
return (
<NavTabs>
<NavTabs.Item
active
ariaLabel="Home"
icon={<HomeIcon size="medium" />}
onClick={handleClick}
/>
<NavTabs.Item
badge
ariaLabel="Money"
icon={<MoneyIcon size="medium" />}
onClick={handleClick}
/>
<NavTabs.Item
ariaLabel="Tag"
icon={<TagIcon size="medium" />}
onClick={handleClick}
/>
<NavTabs.Item
ariaLabel="Menu"
icon={<MenuIcon size="medium" />}
onClick={handleClick}
/>
</NavTabs>
);
};
export default Example;
Instalá el componente via terminal.
npm install @nimbus-ds/nav-tabs
Additional props are passed to the <NavTabs> element. See div docs for a list of props accepted by the <NavTabs> element.