# EuiToolbarComponent

**Type:** component



Toolbar component providing a horizontal container for navigation, branding, and action items.
Supports primary and secondary visual variants with automatic theme inheritance from parent eui-app-toolbar.
Integrates with EuiAppShellService for layout coordination and responsive behavior.
Provides content projection areas for logo, environment indicator, app name, menu items, and user profile.
Detects and adapts to mega menu presence for enhanced navigation capabilities.

```html
<!-- Basic toolbar within app structure -->
<eui-app>
  <eui-app-toolbar>
    <eui-toolbar>
      <eui-toolbar-mega-menu [items]="menuItems"></eui-toolbar-mega-menu>
      <eui-toolbar-items euiPositionRight>
        <eui-toolbar-item-notifications>
          <eui-notifications [count]="5" [items]="notifications"></eui-notifications>
        </eui-toolbar-item-notifications>
      </eui-toolbar-items>
    </eui-toolbar>
  </eui-app-toolbar>
</eui-app>

<!-- Secondary toolbar variant -->
<eui-toolbar [euiSecondary]="true">
  <eui-toolbar-mega-menu [items]="menuItems"></eui-toolbar-mega-menu>
</eui-toolbar>
```

### Accessibility
- Provides semantic navigation structure for toolbar items
- Keyboard navigation supported through child components
- Focus management handled by individual toolbar items
- Theme variants maintain sufficient contrast ratios
- Mega menu integration provides accessible dropdown navigation

### Notes
- Must be used within eui-app-toolbar for proper layout integration
- euiPrimary applies primary brand colors (default: true)
- euiSecondary applies secondary theme and overrides primary
- Automatically inherits secondary styling from parent eui-app-toolbar
- Content projection expects eui-toolbar-mega-menu and eui-toolbar-items children
- Detects mega menu presence for layout adjustments
- Integrates with EuiAppShellService for responsive behavior
- Theme variants are mutually exclusive (secondary overrides primary)


**Selector:** `eui-toolbar`

## Inputs
- **euiPrimary**: `undefined` - Applies primary theme styling to the toolbar. When true, uses primary brand colors. Automatically disabled when euiSecondary is true.
- **euiSecondary**: `undefined` - Applies secondary theme styling to the toolbar. When true, uses secondary colors and automatically disables primary styling. Automatically inherits secondary styling from parent eui-app-toolbar if present.
