ComboStrap UI - Menu bar

About

A menubar is an horizontal navigational bar with links and dropdown menu that should be used in the page header.

Inside a menu component, you can add:

Syntax

<menubar breakpoint="lg" position="normal" align="left" theme="light">

where:

  • breakpoint is one of the breakpoint code (xs,'sm, md, lg (Default), xl) when the menu bar will collapse.
  • position is one of normal (default), top (bottom is not yet supported)
  • align defines the horizontal placement. Possible values: left(Default) or center
  • theme defines the luminance of the text. You can specify light (default) or dark

The default background-color is a light background.

Fixed-top

If you choose a fixed-top navbar, you need also to change a strap template styling parameter. See the dedicated page ComboStrap - Fixed top Menu

Example

A menubar with two dropdown menu and the search box at the right

  • The start of the menubar.
<menubar breakpoint="sm">
<brand class="pt-0" title="Brand">
<icon name="desktop-mac-dashboard" /> Brandly
</brand>
  • Collapse to indicate all elements that will collapse when the size of the screen is lower than the menubar breakpoint
<collapse>
  • A group with expand=“true” to push the element that are not in the group at the right side of the page
<group expand="true">
<dropdown name="Call to Action" >
[[card|Card]]
[[button|Button]]
</dropdown>
<dropdown name="UI Box">
[[note|Note]]
[[card|Card]]
[[blockquote|Blockquote]]
</dropdown>
</group>
<search class="mr-0 pr-0">
</collapse>
</menubar>
  • Output

A dark menubar

<menubar theme="dark" background-color="dark" breakpoint="xs">
<brand title="ComboStrap Home">
<icon name="logo.svg" />
ComboStrap
</brand>
<collapse>
<group>
[[#|Home]]
[[#|Features]]
[[#|Release]]
Menubar text with an inline element
</group>
</collapse>
</menubar>
Powered by ComboStrap