npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@e23thr-dev/loan-calculator

v0.0.4

Published

A React/TypeScript web component for calculating loan payments

Readme

Loan Calculator Web Component

A modern, responsive loan calculator built with React 19, TypeScript, and Tailwind CSS. Available as both a React component and a standalone web component for easy integration into any web application.

Version License Build Status

Features

  • 🔧 Easy Integration: Use as React component or web component
  • 📱 Responsive Design: Works on desktop and mobile devices
  • 🎨 Themeable: Light/dark themes with DaisyUI
  • 💰 Accurate Calculations: Precise loan payment calculations
  • Fast: Built with Vite for optimal performance
  • 🔄 Real-time Updates: Live calculation updates as you type
  • 📊 Detailed Results: Monthly payment, total payment, and interest breakdown
  • Accessible: Screen reader friendly and keyboard navigable

Demo

View the live demo: https://e23thr-open-source.github.io/react-loan-calculator

Installation

Via npm

npm install @e23thr-dev/loan-calculator

Via CDN

<!-- CSS -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@e23thr-dev/loan-calculator@latest/dist/loan-calculator.css">

<!-- JavaScript -->
<script src="https://cdn.jsdelivr.net/npm/@e23thr-dev/loan-calculator@latest/dist/loan-calculator.umd.js"></script>

Usage

As a React Component

import React from 'react';
import { LoanCalculator } from '@e23thr-dev/loan-calculator';
import '@e23thr-dev/loan-calculator/dist/loan-calculator.css';

function App() {
  return (
    <div>
      <LoanCalculator
        initialLoanAmount={250000}
        initialInterestRate={5.0}
        initialLoanTerm={30}
        theme="light"
      />
    </div>
  );
}

As a Web Component (HTML)

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Loan Calculator</title>
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@e23thr-dev/loan-calculator@latest/dist/loan-calculator.css">
</head>
<body>
  <!-- Web Component -->
  <loan-calculator
    loan-amount="300000"
    interest-rate="4.5"
    loan-term="25"
    theme="dark">
  </loan-calculator>

  <script src="https://cdn.jsdelivr.net/npm/@e23thr-dev/loan-calculator@latest/dist/loan-calculator.umd.js"></script>
</body>
</html>

API Reference

React Component Props

| Prop | Type | Default | Description | |------|------|---------|-------------| | initialLoanAmount | number | 250000 | Initial loan amount in dollars | | initialInterestRate | number | 5.0 | Initial annual interest rate as percentage | | initialLoanTerm | number | 30 | Initial loan term in years | | theme | 'light' \| 'dark' | 'light' | Theme for the calculator | | className | string | '' | Additional CSS classes | | eventName | string | loan-calculation-event" | Event name for custom events |

Web Component Attributes

| Attribute | Type | Default | Description | |-----------|------|---------|-------------| | loan-amount | string | "250000" | Initial loan amount | | interest-rate | string | "5.0" | Initial interest rate | | loan-term | string | "30" | Initial loan term in years | | theme | string | "light" | Theme (light/dark) | | class | string | "" | Additional CSS classes | | event-name | string | loan-calculation-event" | Event name for custom events |

Calculation Results

The component provides the following calculated values:

  • Monthly Payment: Principal and interest payment per month
  • Total Payment: Total amount paid over the life of the loan
  • Total Interest: Total interest paid over the life of the loan

Styling

The component uses Tailwind CSS with DaisyUI for styling. You can customize the appearance by:

  1. Theme: Use the theme prop to switch between light and dark themes
  2. CSS Classes: Add custom classes via the className prop
  3. CSS Variables: Override DaisyUI CSS variables for custom colors
  4. Tailwind: If using Tailwind in your project, you can extend the styles

Custom Theme Example

[data-theme="custom"] {
  --p: 220 13% 91%;
  --pc: 220 13% 9%;
  --s: 158 64% 52%;
  --sc: 0 0% 100%;
  --a: 43 96% 56%;
  --ac: 0 0% 100%;
}

Browser Support

  • Chrome/Edge 88+
  • Firefox 85+
  • Safari 14+
  • React 16.8+ (for React component usage)

Development

See DEVELOPMENT.md for development setup and contribution guidelines.

Automated Changelog

This project uses automated changelog generation based on Conventional Commits.

Quick start:

npm run changelog:demo  # Interactive demo
npm run changelog:update  # Manual update

Commit format:

feat: add new feature
fix: resolve bug issue
docs: update documentation

Version workflow:

npm version patch  # Auto-updates changelog
git push origin main --tags  # Triggers release

See docs/CHANGELOG_AUTOMATION.md for full details.

License

MIT © Your Name

Changelog

See CHANGELOG.md for version history and automated release notes.

Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes using conventional commits (git commit -m 'feat: add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Note: Please use conventional commit messages to ensure proper changelog generation.

Support