logo polydile dile-components

dile-input-percentage

This component extends from dile-input.

This component is customized to allow only to introduce integer or float percentage values. When the user introduces a value it is validated to suit this requirement. Also the component add a label to the right with a percentage symbol.

Install

npm install @dile/dile-input

Usage

Import the component.

import '@dile/dile-input/dile-input-percentage';

Use the component

<dile-input-percentage
  name="discount"
  label="Discount"
></dile-input-percentage>

Properties

The same as dile-input and:

dile-input-percentage demos

Regular input

<dile-input-percentage name="tax_withholding" label="Tax withholding" placeholder="Tax withholding"></dile-input-percentage>

Decimal separator ","

<dile-input-percentage decimalSeparator="," name="discount" label="Discount" placeholder="Discount"></dile-input-percentage>