Skip to component content
Navigation077 / 155

NavigationLink

Mark a current route and safely disable unavailable destinations.

Example
Source
NavigationLink.tsxtsx
import { HStack, NavigationLink } from "@/ohmygui";

export default function Example() {
  return (
    <HStack gap="sm" wrap>
      <NavigationLink href="/ohmygui/navigation-link" state="active">
        Current component
      </NavigationLink>
      <NavigationLink href="/ohmygui/sidebar">Explore Sidebar</NavigationLink>
      <NavigationLink href="/not-available" disabled>
        Unavailable
      </NavigationLink>
    </HStack>
  );
}