How to change text color of ui.input() ? #420
-
|
Hello there, i'd like to change the text color of an input field. This is what i tried so far, but without success: ui.input(label='IP:').style('color: #FFFFFF !important').props('outlined color=orange-4 label-color=white filled')If i add e.g. a font-size style it will apply to my text but for a unknown reason the color isn't changing. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
That's strange. Quasar's And But you can use the ui.input().props('input-style="color: red"') |
Beta Was this translation helpful? Give feedback.
That's strange. Quasar's
colorprop doesn't affect the input text, but only some kind of focus indicator:https://quasar.dev/vue-components/input#coloring
And
.style('color: #FFFFFF !important')does not work, becauseui.inputconsists of multiple nested HTML elements andstyleonly affects the outermost element.But you can use the
input-styleprop to apply CSS to the input HTML element: