sterling-svelte  1.0.12
A modern, accessible, lightweight UI component library for Svelte.
Exciting News! sterling-svelte 2.0 is out and built on Svelte 5! Read all about it here!

MenuBar

A horizontal list of <MenuItem>s, often positioned at the top of a window

Code
<script lang="ts">
  import { MenuBar } from '@geoffcox/sterling-svelte';
</script>

<MenuBar>
  <!-- <MenuItem> ... -->
</MenuBar>

Members

Property Name Type Default Comment
variant string '' Additional class names to apply

Event Name Data Comment
close value Raised when a descendant menu is closed
open value Raised when a descendant menu is opened
selected value Raised when descendant menu item is selected

Considerations

  • Prefer using the Label component rather than the label produced by providing default slot content.
  • Includes HTMLAnchorElement props, event, and methods

Anatomy

<div class="sterling-menu-bar">
  <slot {variant} />
</div>