diff --git a/app/interactives/mortgage-calculator/page.tsx b/app/interactives/mortgage-calculator/page.tsx index 8a9b701..463efef 100644 --- a/app/interactives/mortgage-calculator/page.tsx +++ b/app/interactives/mortgage-calculator/page.tsx @@ -4,6 +4,7 @@ import React, { useState, useEffect, useCallback } from 'react'; import ThemeToggle from "@/app/lib/theme-toggle"; import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/app/ui/components/tabs"; import { Card, CardContent, CardHeader, CardTitle } from "@/app/ui/components/card"; +import { BiSolidDownArrow, BiSolidUpArrow } from "react-icons/bi"; export default function MortgageCalculator() { const [mode, setMode] = useState('afford'); // 'afford', 'affordability', 'payment' @@ -123,8 +124,36 @@ export default function MortgageCalculator() { step="1" value={monthlyPayment} onChange={(e) => setMonthlyPayment(e.target.value)} - className="w-full pl-8 pr-4 py-3 border-2 border-gray-300 rounded-lg focus:border-blue-500 focus:ring-2 focus:ring-blue-200 outline-none transition" + className="w-full pl-8 pr-4 py-3 border-2 border-gray-300 rounded-lg focus:border-blue-500 focus:ring-2 focus:ring-blue-200 outline-none transition [appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none" /> +
+ + +

Taxes, insurance, and HOA are separate—add estimates below to see your total cost.

@@ -183,9 +212,44 @@ export default function MortgageCalculator() { setDownPaymentPercent((value / Number(homePrice)) * 100); } }} - className="w-full pl-4 pr-16 py-3 border-2 border-gray-300 rounded-lg focus:border-blue-500 focus:ring-2 focus:ring-blue-200 outline-none transition" + className="w-full pl-4 pr-16 py-3 border-2 border-gray-300 rounded-lg focus:border-blue-500 focus:ring-2 focus:ring-blue-200 outline-none transition [appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none" /> - +
+ + +
@@ -200,7 +264,7 @@ export default function MortgageCalculator() { min="0" value={interestRate} onChange={(e) => setInterestRate(e.target.value)} - className="w-full pr-8 pl-4 py-3 border-2 border-gray-300 rounded-lg focus:border-blue-500 focus:ring-2 focus:ring-blue-200 outline-none transition" + className="w-full pr-8 pl-4 py-3 border-2 border-gray-300 rounded-lg focus:border-blue-500 focus:ring-2 focus:ring-blue-200 outline-none transition [appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none" /> % @@ -239,7 +303,7 @@ export default function MortgageCalculator() { {/* Property Taxes */}
- +
+ +
@@ -352,7 +451,7 @@ export default function MortgageCalculator() { setHomeInsurancePercent((value / Number(homePrice)) * 100); } }} - className="w-full pl-4 pr-16 py-3 border-2 border-gray-300 rounded-lg focus:border-blue-500 focus:ring-2 focus:ring-blue-200 outline-none transition" + className="w-full pl-4 pr-16 py-3 border-2 border-gray-300 rounded-lg focus:border-blue-500 focus:ring-2 focus:ring-blue-200 outline-none transition [appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none" /> @@ -370,7 +469,7 @@ export default function MortgageCalculator() { min="0" value={hoaDues} onChange={(e) => setHoaDues(e.target.value)} - className="w-full pl-8 pr-4 py-3 border-2 border-gray-300 rounded-lg focus:border-blue-500 focus:ring-2 focus:ring-blue-200 outline-none transition" + className="w-full pl-8 pr-4 py-3 border-2 border-gray-300 rounded-lg focus:border-blue-500 focus:ring-2 focus:ring-blue-200 outline-none transition [appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none" /> @@ -417,7 +516,7 @@ export default function MortgageCalculator() {
- Mortgage (P&I): + Mortgage Payment:
@@ -497,7 +596,7 @@ export default function MortgageCalculator() { step="1" value={homePrice} onChange={(e) => setHomePrice(e.target.value)} - className="w-full pl-8 pr-4 py-3 border-2 border-gray-300 rounded-lg focus:border-blue-500 focus:ring-2 focus:ring-blue-200 outline-none transition" + className="w-full pl-8 pr-4 py-3 border-2 border-gray-300 rounded-lg focus:border-blue-500 focus:ring-2 focus:ring-blue-200 outline-none transition [appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none" />

Enter the purchase price of the home.

@@ -558,7 +657,7 @@ export default function MortgageCalculator() { setDownPaymentPercent((value / Number(homePrice)) * 100); } }} - className="w-full pl-4 pr-16 py-3 border-2 border-gray-300 rounded-lg focus:border-blue-500 focus:ring-2 focus:ring-blue-200 outline-none transition" + className="w-full pl-4 pr-16 py-3 border-2 border-gray-300 rounded-lg focus:border-blue-500 focus:ring-2 focus:ring-blue-200 outline-none transition [appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none" />
@@ -574,7 +673,7 @@ export default function MortgageCalculator() { min="0" value={interestRate} onChange={(e) => setInterestRate(e.target.value)} - className="w-full pr-8 pl-4 py-3 border-2 border-gray-300 rounded-lg focus:border-blue-500 focus:ring-2 focus:ring-blue-200 outline-none transition" + className="w-full pr-8 pl-4 py-3 border-2 border-gray-300 rounded-lg focus:border-blue-500 focus:ring-2 focus:ring-blue-200 outline-none transition [appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none" /> % @@ -614,7 +713,7 @@ export default function MortgageCalculator() { {/* Property Taxes */}
- +
@@ -727,7 +826,7 @@ export default function MortgageCalculator() { setHomeInsurancePercent((value / Number(homePrice)) * 100); } }} - className="w-full pl-4 pr-16 py-3 border-2 border-gray-300 rounded-lg focus:border-blue-500 focus:ring-2 focus:ring-blue-200 outline-none transition" + className="w-full pl-4 pr-16 py-3 border-2 border-gray-300 rounded-lg focus:border-blue-500 focus:ring-2 focus:ring-blue-200 outline-none transition [appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none" />
@@ -745,7 +844,7 @@ export default function MortgageCalculator() { min="0" value={hoaDues} onChange={(e) => setHoaDues(e.target.value)} - className="w-full pl-8 pr-4 py-3 border-2 border-gray-300 rounded-lg focus:border-blue-500 focus:ring-2 focus:ring-blue-200 outline-none transition" + className="w-full pl-8 pr-4 py-3 border-2 border-gray-300 rounded-lg focus:border-blue-500 focus:ring-2 focus:ring-blue-200 outline-none transition [appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none" />
@@ -794,7 +893,7 @@ export default function MortgageCalculator() {
- Mortgage (P&I): + Mortgage Payment: