Matterway
    Preparing search index...

    Function percentField

    • Percent input field component with percent icon prefix.

      Parameters

      • props: UiPercentFieldProps

        Configuration object

        • name

          Name of the component

        • label

          Label text

        • placeholder

          Placeholder text

        • defaultValue

          Default value for the percent field

        • required

          If true, the field is required

        • disabled

          If true, the field is disabled

        • invalid

          If false/undefined the field is valid. If a string is provided, it will be used as the validation message

      Returns Element

      Basic usage with required props

      percentField({
      name: 'rate',
      label: 'Interest Rate',
      });

      Usage with default value

      percentField({
      name: 'tax',
      label: 'Tax Rate',
      defaultValue: '15',
      placeholder: 'Enter percent',
      required: true,
      disabled: false
      });