AppBar Component a comprehensive guide

The AppBar component is a cornerstone of application navigation, offering enhanced functionality and usability. Built on top of the Toolbar component, the AppBar is ideal for creating a consistent and customizable navigation experience. Mytril’s AppBar ensures that your application remains visually appealing and accessible across devices.

Note: it’s recommended to use a single AppBar instance per application to maintain design consistency and reduce complexity.

Using the AppBar component

Implementing the AppBar in your project is straightforward:

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

<AppBar>
	<!-- your content -->
</AppBar>

Core AppBar subcomponents

Mytril’s AppBar includes powerful subcomponents that simplify the creation of structured navigation.

ComponentDescription
AppBarThe main container for your application bar
AppBarTitleDisplays the title in the AppBar

Here’s an example of a fully implemented AppBar with a title:

<script>
	import { AppBar, AppBarTitle } from 'mytril';
</script>

<AppBar>
	<AppBarTitle>Application</AppBarTitle>
</AppBar>

AppBar component properties

The AppBar is highly customizable, with properties designed for flexibility and ease of use.

PropertyTypeDefaultDescription
tagstringdivSpecify a custom tag for the root element
locationtop or bottomtopUDetermines whether the AppBar is displayed at the top or bottom of the screen

The AppBar component inherits additional properties from the Toolbar component, such as dark, light, dense, and color, making it highly versatile for different design requirements.

AppBarTitle subcomponent

The AppBarTitle is used to define a clear, prominent title within the AppBar. It supports minimal configuration for quick setup:

<script>
	import { AppBar, AppBarTitle } from 'mytril';
</script>

<AppBar>
	<AppBarTitle>// your content</AppBarTitle>
</AppBar>
PropertyTypeDefaultDescription
tagstringdivSpecify a custom tag for the root element

Why use Mytril’s AppBar?

  1. Enhanced navigation: Mytril’s AppBar offers flexible positioning, supporting both top and bottom screen placement
  2. Seamless integration: leverages Toolbar component features for smooth implementation
  3. Customizable and accessible: includes dark and light themes, dynamic color schemes, and utility classes
  4. Built for performance: optimized specifically for Svelte, without external dependencies
  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.