浏览代码

add note about styling the `ui.input` element (fixes #1884)

Falko Schindler 1 年之前
父节点
当前提交
82e648a8ef
共有 1 个文件被更改,包括 6 次插入0 次删除
  1. 6 0
      nicegui/elements/input.py

+ 6 - 0
nicegui/elements/input.py

@@ -29,6 +29,12 @@ class Input(ValidationElement, DisableableElement, component='input.js'):
         You can use the `validation` parameter to define a dictionary of validation rules.
         The key of the first rule that fails will be displayed as an error message.
 
+        Note about styling the input:
+        Quasar's `QInput` component is a wrapper around a native `input` element.
+        This means that you cannot style the input directly,
+        but you can use the `input-class` and `input-style` props to style the native input element.
+        See the "Style" props section on the `QInput <https://quasar.dev/vue-components/input>`_ documentation for more details.
+
         :param label: displayed label for the text input
         :param placeholder: text to show if no value is entered
         :param value: the current value of the text input