Components/Discount Input

Discount Input

Toggle between percent and absolute value. Live preview of the effective discount when a base amount is provided.


Desconto efetivo: R$ 15,00

Installation

npx @ajax-ui/cli add discount-input

Props

  • value + onChange for controlled { mode, amount }.
  • baseAmount - used to render the "Desconto efetivo" preview.
  • currency "BRL" · locale "pt-BR".
  • Switching mode resets the amount - values aren't directly translatable.