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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@wiserdomenpm/roi-calculator

v1.0.3

Published

Luxury property ROI calculator component for real estate applications

Downloads

405

Readme

ROI Calculator - Luxury Property Investment Tool

A modern, clean React component for calculating property investment ROI. Built for luxury real estate brands with sophisticated styling and real-time calculations.

Deployed on Vercel Built with v0

Installation

```bash npm install @yourusername/roi-calculator ```

Or with yarn: ```bash yarn add @yourusername/roi-calculator ```

Features

  • Real-time ROI calculations with React Hook Form
  • Smooth slider control for management fees
  • Luxury-focused UI with premium styling
  • TypeScript support with full type safety
  • Zustand state management for calculations
  • Recharts integration for visualization
  • Responsive design (mobile and desktop)
  • Annual net income calculation
  • ROI percentage metrics

Usage

```tsx import { ROICalculator } from '@yourusername/roi-calculator'

export default function Page() { return ( ) } ```

Inputs

  • Property Value - Total purchase price of the property
  • Monthly Rent - Expected monthly rental income
  • Management Fee (%) - Percentage of rent for property management (slider controlled)
  • Maintenance Costs - Annual maintenance and repair expenses

Outputs

  • Annual Net Income - Total yearly income after expenses
  • ROI % - Return on investment percentage based on property value
  • Monthly Breakdown - Detailed rent, fees, and maintenance breakdown

Props

The ROICalculator component currently has no required props and works standalone.

```tsx ```

Using the Store

Access calculations directly via Zustand store:

```tsx import { useROIStore } from '@yourusername/roi-calculator'

export default function MyComponent() { const propertyValue = useROIStore((state) => state.propertyValue) const setPropertyValue = useROIStore((state) => state.setPropertyValue)

return ( <input value={propertyValue} onChange={(e) => setPropertyValue(Number(e.target.value))} /> ) } ```

Requirements

  • React 18+ or 19+
  • Next.js 14+
  • TailwindCSS 4+

Dependencies

  • zustand - State management
  • react-hook-form - Form handling
  • @hookform/resolvers - Form validation
  • zod - Schema validation
  • recharts - Charting
  • @radix-ui/react-slider - Slider component
  • tailwindcss - Styling

Development

Clone and install dependencies:

```bash git clone https://github.com/yourusername/v0-roi-calculator.git cd v0-roi-calculator npm install npm run dev ```

Build for production:

```bash npm run build ```

Publishing Updates

  1. Make your changes
  2. Update version in package.json
  3. Run npm run build
  4. Run npm publish

Repository

License

MIT


Built with v0.app and automatically synced with GitHub