wc-interest-calc
v2.1.0
Published
A simple compund interest calculator as web component
Downloads
75
Readme
Interest Calculator as Web Component
A simple compount interest calculator built as a web component.
You can calculate the principal, interest, duration or the final amount based on the other values.
How to use
Include the interest-component.js
script into your page.
Then use the wc-interest-calc
selector to use the interest calculator in your page.
Properties
| Property | Attribute | Description | Type | Default |
| ------------- | -------------- | -------------------------------------------------------------------------------- | -------- | --------------------- |
| checked
| checked
| Which of the radioButtons should be selected; possible values are descrbed below | string
| 'finalAmount'
|
| duration
| duration
| duration (in years) | number
| 0
|
| finalAmount
| final-amount
| final Amount after interest is applied to the principal | number
| 0
|
| interest
| interest
| interest | number
| 0
|
| principal
| principal
| principal (starting Amount) | number
| 0
|
| symbol
| symbol
| symbol used next to the principal and final Amount input | string
| $
|
| headerText
| header-text
| Optional Header | string
| Interest Calculator
|
Possible values for checked
are:
'principal'
, 'interest'
, 'duration'
, 'finalAmount'