Skip to content

Navigation (Horizontal)

A horizontal navigation component for navigating between pages.

See all the examples and details in the Storybook.

Usage

tsx
import { NavigationHorizontal } from "@samgl/graffiti-ui";

const MyNavigation = () => {
  return (
    <NavigationHorizontal
      links={[
        {
          text: "Home",
          to: "/",
        },
        {
          text: "Explore",
          to: "/explore",
        },
        {
          text: "Notifications",
          to: "/notifications",
        },
        {
          text: "Messages",
          to: "/messages",
        },
        {
          text: "Bookmarks",
          to: "/bookmarks",
        },
        {
          text: "Profile",
          to: "/profile",
        },
        {
          text: "Settings",
          to: "/settings",
        },
        {
          text: "More",
          to: "/more",
        },
      ]}
    />
  );
};

Props

PropTypeDefaultOptionalDescription
linksNavigationHorizontalProps["links"]An array of links to display in the navigation.
$linkSizestringmdThe size of the links.
classNamestringThe class name of the component, generally used when extending the component with a styled component.