Toolbar
A Quasar Layout can have headers and/or footers (also called “marginals”) and this is a great place to use Toolbars, but note that you can also place Toolbars anywhere else you want. One QToolbar will represent a row in your marginals, usually used for navigation buttons and a title (but not limited to only this).
Installation
Edit /quasar.conf.js
:framework: {
components: [
'QToolbar',
'QToolbarTitle'
]
}
Basic Usage
<q-toolbar color="primary"> |
Example on using a Toolbar on Layout header:
<q-layout> |
QToolbar Vue Props
Property | Type | Description |
---|---|---|
color |
String | A color from Quasar Color Palette |
text-color |
String | One from Quasar Palette to override color of text |
inverted |
Boolean | Invert color: background becomes “white” while text has color |
glossy |
Boolean | Apply a glossy effect |
shrink |
Boolean | Check Shrink section |
QToolbarTitle
QToolbarTitle is a component used to wrap the “title” of your Toolbar. It spreads horizontally to the full real estate space it can get. If not enough space to cover the full extent of the content then ending ellipsis are used.
<!-- A Toolbar with a title and subtitle --> |
Shrink
By default, QToolbarTitle is set to grow to the available space. However, you can change that with the shrink
Boolean prop:<q-toolbar-title shrink>
Title
</q-toolbar-title>