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

    Get toggle buttons with 2 different colors on toggle

    Help
    2
    3
    53
    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.
    • B
      bambinou last edited by

      Hello,

      I would like to have 2 colors in a toggle button but could not find any help in the api, any idea what is the best way of doing this please?

      ie:

      Left & right
      When the button is on the left, it should be red and when the toggle is moved to the right, it should be green.

      <q-btn-toggle
              v-model="props.row.state"
              push
              glossy
              :options="[
                {label: 'LEFT', value: 'left'},
                {label: 'RIGHT', value: 'right'},
              ]"
            />
                </q-td>
      

      Thanks.

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

        @bambinou were you the one who posted this issue in GH? anyway updated the pen https://codepen.io/metalsadman/pen/PMMBjp.

        1 Reply Last reply Reply Quote 0
        • B
          bambinou last edited by

          Hello,

          Yes it was me 🙂

          Thank you so much, this is exactly what I was looking for, brilliant!

          1 Reply Last reply Reply Quote 0
          • First post
            Last post