Toolbar component with Mytril

The toolbar is an essential element of modern graphical interfaces, often serving as the navigation center for applications. With Mytril, creating versatile, responsive and visually appealing toolbars is effortless.

Using the Toolbar

To create a navigation bar, wrap your content inside the Toolbar component:

<script>
	import { Toolbar } from 'mytril';
</script>

<Toolbar>
	<!-- your content -->
</Toolbar>

Core Toolbar sub components

Mytril’s toolbar system is built on modular components, making it easy to organize titles, navigation items, and actions.

ComponentDescription
ToolbarThe main container for your navigation bar
ToolbarTitleDisplays a title within the toolbar
ToolbarItemsHolds navigation content, buttons, or icons

Example

<script>
	import { Toolbar, ToolbarTitle, ToolbarItems, Btn } from 'mytril';
</script>

<Toolbar>
	<ToolbarTitle>Application</ToolbarTitle>
	<ToolbarItems>
		<Btn>Menu 1</Btn>
		<Btn>Menu 2</Btn>
		<Btn>Menu 2</Btn>
	</ToolbarItems>
</Toolbar>

Toolbar component properties

PropertyTypeDefaultDescription
tagstringdivSpecify a custom tag for the root element
darkbooleanfalseApplies a dark theme
lightbooleanfalseApplies a light theme
absolutebooleanfalsePositions the toolbar absolutely within its container
densebooleanfalseReduces toolbar height to 48px
heightstring or number64pxets the toolbar height
floatingbooleanfalseMakes the toolbar inline (floating)
outlinedbooleanfalseAdds a border to the toolbar and removes its background
textbooleanfalseRemoves both background and border styles
roundedstringundefinedAdds border radius to the toolbar
colorstringundefinedSets the background color. Accepts HEX, RGB, RGBA, X11, or Mytril themes colors
colorTextstringundefinedSets the text color. Ignored when outline or text is active

ToolbarTitle

The ToolbarTitle subcomponent is used for adding a title to the toolbar.

<script>
	import { Toolbar, ToolbarTitle } from 'mytril';
</script>

<Toolbar>
	<ToolbarTitle>// your content</ToolbarTitle>
</Toolbar>
PropertyTypeDefaultDescription
tagstringdivSpecifies a custom tag for the root element

ToolbarItems

The ToolbarItems subcomponent contains navigational items, buttons, or other interactive elements.

<script>
	import { Toolbar, ToolbarItems } from 'mytril';
</script>

<Toolbar>
	<ToolbarItems>// your content</ToolbarItems>
</Toolbar>
PropertyTypeDefaultDescription
tagstringdivSpecifies a custom tag for the root element

Why choose Mytril’s Toolbar component?

  • Simplified navigation: build clean, intuitive navigation bars with minimal code
  • Responsive design: adapts effortlessly to different screen sizes
  • Customizable: includes properties for color schemes, themes, sizes, and border styles
  • Semantic and accessible: designed with semantic HTML to ensure better accessibility and SEO compliance
  1. Home
Help us improve this component!
or

Minedelve respects your privacy

Minedelve and our partners use cookies or similar technologies to enable us to improve the site, your experience and to ensure the proper functioning of the site, to collect statistics in order to optimize the services offered, and to adapt Minedelve's content.