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

    Changing color of the outline of Input component

    Help
    2
    5
    1417
    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.
    • A
      AdrianG last edited by

      Is there a way to change the outline color of the Input component? This is not a general override, but case by case. E.g. I have a page with 3 Input components, where two of them needs to have a different border color

      I tried several methods here: https://codepen.io/Adagio_B/pen/RwaVgOa

      Unfortunately none of them seem to work. Either it changes the full div, or it only applies for the input-area

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

        @AdrianG use color prop

        A 1 Reply Last reply Reply Quote 0
        • A
          AdrianG @metalsadman last edited by

          @metalsadman Do you mean setting color=“green” like here?

          <q-input label="1" outlined v-model="text" :dense="dense" color="green">
          
          </q-input>
          

          As far as I can tell, this only sets the color when the field has focus

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

            @AdrianG inspect the element and override the css, the color is it is coz quasar follows the material spec. anyway here’s how you do it https://codepen.io/metalsadman/pen/xxVrwGW. know that when doing this sometime you’ll have to look into the source.

            A 1 Reply Last reply Reply Quote 1
            • A
              AdrianG @metalsadman last edited by

              @metalsadman Thank you so much, I learned something new. I didn’t know you could override it like that. I only knew how to override it for all

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