Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change the icon used by v-toolbar-side-icon?

Tags:

vuetify.js

Is it possible to change the icon used in by v-toolbar-side-icon to a custom one?

    <template>
      <v-toolbar>
        <v-toolbar-side-icon></v-toolbar-side-icon>
        <v-toolbar-title>Title</v-toolbar-title>
        <v-spacer></v-spacer>
        <v-toolbar-items class="hidden-sm-and-down">
          <v-btn flat>Link One</v-btn>
          <v-btn flat>Link Two</v-btn>
          <v-btn flat>Link Three</v-btn>
        </v-toolbar-items>
      </v-toolbar>
    </template>

There is no props or documentation for that component itself in https://next.vuetifyjs.com/en/components/toolbars

like image 725
Archimedes Trajano Avatar asked Sep 19 '18 00:09

Archimedes Trajano


People also ask

What is V toolbar?

The v-toolbar component is pivotal to any graphical user interface (GUI), as it generally is the primary source of site navigation. The toolbar component works great in conjunction with v-navigation-drawer and v-card .

How do I use Vuetify icons?

The v-icon component provides a large set of glyphs to provide context to various aspects of your application. For a list of all available icons, visit the official Material Design Icons page. To use any of these icons simply use the mdi- prefix followed by the icon name.

What is V app Vuetify?

In Vuetify, the v-app component and the app prop on components like v-navigation-drawer , v-app-bar , v-footer and more, help bootstrap your application with the proper sizing around <v-main> component. This allows you to create truly unique interfaces without the hassle of managing your layout sizing.


3 Answers

At this time, you can change it the by doing this:

<v-app-bar-nav-icon>
          <v-icon>mdi-database</v-icon>
        </v-app-bar-nav-icon> 

Where <v-icon>mdi-database</v-icon> is which icon i want to display instead the default one.

The result must be : Change vuetify app-bar-nav-icon

Hope it can help you.

like image 127
Dahkenangnon Avatar answered Dec 03 '22 08:12

Dahkenangnon


<v-toolbar-side-icon> has been deprecated in Vuetify 2.0

Please use <v-app-bar-nav-icon></v-app-bar-nav-icon> instead.

like image 32
Neal Mummau Avatar answered Dec 03 '22 09:12

Neal Mummau


EDIT:
This solution was initially for Vuetify v1. See other answer for v2.


Codepen

Use custom v-icon in v-toolbar-side-icon's default slot

<v-toolbar-side-icon>
  <v-icon>more_vert</v-icon>
</v-toolbar-side-icon>
like image 22
Traxo Avatar answered Dec 03 '22 10:12

Traxo