No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Using custom icons in Quasar components

    Framework
    5
    8
    7370
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • eleina
      eleina last edited by

      Hello,

      I was wondering if it is possible to use custom icons instead of material icons, the same way as they are used now. For example:

      <q-drawer-link icon='my_icon'>Some drawer link</q-drawer-link>
      

      I saw a topic that was tackling this same issue: http://forum.quasar-framework.org/topic/320/use-icons-outside-the-material-io/6, where someone suggests a plugin for this.
      But it would be more nice if this would be possible without a plugin, maybe an idea for future releases? 🙂

      Thanks in advance!

      1 Reply Last reply Reply Quote 0
      • s.molinari
        s.molinari last edited by

        Good news! Version 0.14 will have more icons.

        The docs are still rough, but it should give you an idea of what is coming. 😄

        https://github.com/quasarframework/quasar-framework.org/blob/dev/source/components/icons.md

        Scott

        eleina 1 Reply Last reply Reply Quote 3
        • eleina
          eleina @s.molinari last edited by

          @s.molinari Thanks for your reply! It’s really awesome that other icons will be implemented 🙂 unfortunately the client wants to use some of its own icons… Found a way with CSS to put the icon there, but it’s a bit ugly

          1 Reply Last reply Reply Quote 0
          • P
            packy last edited by

            @eleina now that Quasar is going to use fontawsome icon you can change a standard icon like so with CSS/Sass/Stylus (not sure if thats what you were referring to in your post about ‘Found a way with CSS to put the icon there, but it’s a bit ugly’):

            .fa-facebook:before{
                  content:url("path/to/your/img.svg");
            }
            
            eleina 1 Reply Last reply Reply Quote 1
            • eleina
              eleina @packy last edited by

              @packy Thanks for your reply, I didn’t think about that being a possibility!

              1 Reply Last reply Reply Quote 0
              • mesqueeb
                mesqueeb last edited by

                @eleina A proposal is currently in progress to add the functionality for custom icons:
                https://github.com/quasarframework/quasar/issues/2494

                Also, in that thread is explained how to create your own icon font, though it be a bit cumbersome…

                eleina 1 Reply Last reply Reply Quote 2
                • eleina
                  eleina @mesqueeb last edited by

                  @mesqueeb One year later haha, but the proposal seems nice!

                  1 Reply Last reply Reply Quote 1
                  • Hawkeye64
                    Hawkeye64 last edited by

                    I am using the :before css to do the trick:

                    .fa-ptz16:before {
                      content: url('~assets/ptz16x16-L.png');
                    }
                    .fa-ptz24:before {
                      content: url('~assets/ptz24x24-L.png');
                    }
                    .fa-ptz32:before {
                      content: url('~assets/ptz32x32-L.png');
                    }
                    
                    1 Reply Last reply Reply Quote 1
                    • First post
                      Last post