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

    How to change the color of form field text?

    Help
    2
    2
    481
    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.
    • Y
      ytsejam last edited by

      How do you change the text-color of q-input label and hint text-color? class=“text-white” did not work.

      <div class="col-3 text-white">
          <h2>Giriş Yap</h2>
            <q-form
              class="q-gutter-md"
            >
              <q-input
                filled
                class="text-white"
                v-model="userinfo.email"
                label="Email *"
                hint="Email Adresiniz"
                lazy-rules
                :rules="[ val => val && val.length > 0 || 'Please type something']"
              />
      
              <q-input
                filled
                type="password"
                v-model="userinfo.password"
                label="Your email *"
                lazy-rules
                :rules="[ val => val && val.length > 0 || 'Please type something']"
              />
              <div>
                <q-btn label="Submit" type="submit" @click="loginUser" color="primary"/>
              </div>
            </q-form>
          </div>
      

      Thanks

      beets 1 Reply Last reply Reply Quote 0
      • beets
        beets @ytsejam last edited by beets

        @ytsejam You can use label-color="white" for the label, for the hint, you will probably need to use bottom-slots. So something like this:

        <q-input
          filled
          v-model="userinfo.email"
          label="Email *"
          label-color="white"
          lazy-rules
          :rules="[ val => val && val.length > 0 || 'Please type something']"
          bottom-slots
          >
          <template v-slot:hint>
            <div class="text-white">Email Adresiniz</div>
          </template>
        </q-input>
        

        Not positive how that works with an error message, but should get you on the right track.

        Edit: also if you just want white, are you sure you don’t just need the dark property instead?

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