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

    [Solved] [V1] QInput - How to add "red star" to indicate it is a required field

    Framework
    2
    3
    281
    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.
    • S
      Stanley last edited by Stanley

      Dear Quasar team,

      I walk through the demo of QForm at link https://quasar.dev/vue-components/form and we can see that it adds the star at the end of the label to indicate it is a required field. But is there a better way to color it as red?

      I reproduced it at below link, thanks for your help.
      https://codepen.io/Stanley-549393092/pen/WNepJJJ?editors=1111

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

        you can’t do it without tampering with the dom, as label prop only allows string. why not make use of other slots/props to indicate that a field is required tho ie. hint, prefix, prepend/append slots etc. etc...?.

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

          @metalsadman Thanks! Finally I decide to keep it as the demo did although it is not so obvious. For you suggestion, I think it occupy additional space in the UI.

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