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

    [v1-beta] How to display q-input labels above the field?

    Help
    3
    5
    1296
    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.
    • D
      ddenev last edited by

      Hi,

      I am prototyping an app and in our company guidelines the form labels should be placed above the form fields and always visible. Currently QInput allows the label to only be within the field.

      How should I instruct QInput to display its labels above the field? Is this possible?

      Thank you in advance!

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

        @ddenev - The stacked-label prop always puts the label above the field.

        https://codepen.io/smolinari/pen/PgwYGz?editors=1010

        If you mean actually completely above the field, like above the darker area in the Standout style, that isn’t part of the Material Design specs, which Quasar follows. If you want that, you’ll have to design your own input component by making an external label structure and leaving the label prop empty in QInput.

        Scott

        1 Reply Last reply Reply Quote 1
        • D
          ddenev last edited by

          Thank you very much, Scott!

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

            For those who are still interested, there is a simple CSS-only solution here:

            https://codepen.io/rubem-pechansky/pen/NWKNwye

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

              Or this one too. 😁

              https://codepen.io/smolinari/pen/YzKqepz

              Scott

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