Menu
An interactive list of menu items.
Code
<script lang="ts">
import { Menu } from '@geoffcox/sterling-svelte';
</script>
<Menu>
<!-- <MenuItem> ... -->
</Menu>
Members
| Method Name | Parameters | Return Type | Comment |
---|
| focusFirstMenuItem | | |
| focusPreviousMenuItem | | |
| focusNextMenuItem | | |
| focusLastMenuItem | | |
Considerations
- Menu is a building block for a hierarchy of others components such as MenuBar, MenuButton, MenuItem, and MenuSeparator.
- Position is based on the reference element.
- The menu floats above other elements on the page via portal.
- Includes HTMLDivElement props, events, and methods.
Anatomy
menu (<div>)
menu items (<div>)
children (Snippet)