Theme

Start Here

Start from the smallest working snippet, then move to interactive examples and the full API contract below.

Styled quick start

Copy this entrypoint first. It includes the imports required to get the component on screen.

svelte
<script lang="ts">
  import '@dryui/ui/themes/default.css';
  import '@dryui/ui/themes/dark.css';
  import { NavigationMenu } from '@dryui/ui';
</script>

<NavigationMenu.Root>
  <NavigationMenu.List>...</NavigationMenu.List>
  <NavigationMenu.Item>...</NavigationMenu.Item>
  <NavigationMenu.Trigger>...</NavigationMenu.Trigger>
  <NavigationMenu.Content>...</NavigationMenu.Content>
  <NavigationMenu.Link>...</NavigationMenu.Link>
</NavigationMenu.Root>

Import options

Root package

ts
import { NavigationMenu } from '@dryui/ui'

Per-component subpath

ts
import { NavigationMenu } from '@dryui/ui/navigation-menu'

Customize

Use the interactive examples to see common variants, states, and composition patterns before building your own.

Structure

Compound components always start with NavigationMenu.Root. Use this structure block to understand required wrappers before you wire state or styling.

NavigationMenu.Root
  NavigationMenu.List
  NavigationMenu.Item
  NavigationMenu.Trigger
  NavigationMenu.Content
  NavigationMenu.Link
NavigationMenu.Root NavigationMenu.ListNavigationMenu.ItemNavigationMenu.TriggerNavigationMenu.ContentNavigationMenu.Link

Compose

The full API contract lives here: props, CSS variables, and the public data attributes you can target when styling.

Compound component. Start with NavigationMenu.Root, then add only the parts you need.

NavigationMenu.ListNavigationMenu.ItemNavigationMenu.TriggerNavigationMenu.ContentNavigationMenu.Link

NavigationMenu.Root

Prop Type Default Required Bindable
children
Snippet

Forwards <element> attributes via rest props. Common examples: id, class, aria-label.

NavigationMenu.List

Prop Type Default Required Bindable
children
Snippet

Forwards <ul> attributes via rest props. Common examples: id, style, aria-labelledby.

NavigationMenu.Item

Prop Type Default Required Bindable
children
Snippet

Also accepts standard HTML attributes (class, style, id, etc.)

NavigationMenu.Trigger

Prop Type Default Required Bindable
children
Snippet

Forwards <button> attributes via rest props. Common examples: type, disabled, name.

NavigationMenu.Content

Prop Type Default Required Bindable
children
Snippet

Forwards <div> attributes via rest props. Common examples: id, style, role.

NavigationMenu.Link

Prop Type Default Required Bindable
active
boolean
false
children
Snippet

Forwards <a> attributes via rest props. Common examples: href, target, rel.