Calculator

A cinematic, fully functional calculator with a modern interface. Supports all standard arithmetic operations, percentage calculations, and sign toggling with smooth Framer Motion transitions.

utility Premium Plan

Availability

Included in Premium Plans

This flagship component is part of Future UI's monthly & yearly Premium plans and is not distributed via the free public CLI.

Import

import { Calculator } from "@/components/ui/calculator"
Layout Variant
Color Theme
Theme
Shape
Spacing

Named Keys & Props

Pass these exact named keys as props on <Calculator />. Click any color pill to copy the prop.

colorDefault is "default"(Black & White)
variantVisual style
"solid""outline""ghost""link"
themeSurface theme
"default""modern""clean""futuristic""brutal""halftone"
shapeCorner shape
"default""square""rounded""sharp"
spacingInner spacing
"default""2x""4x""6x""8x"

Usage Example

A basic implementation example to get you started.

Example Implementation
import { Calculator } from"@/components/ui/calculator";

export default function Example() {
 return (
 <div className="flex items-center justify-center p-8 bg-black">
 <Calculator theme="futuristic" variant="solid" color="emerald"/>
 </div>
 );
}

Features

Key capabilities and highlights.

Key Capabilities
  • ◆Fully functional arithmetic operations (+, -, *, /).
  • ◆Support for decimal points, percentages, and sign toggling (+/-).
  • ◆Extensive thematic support: Default, Modern, Clean, Futuristic, Brutal, and Halftone.
  • ◆Full 10-color palette mapping to interactive states, glowing borders, and shadows.
  • ◆Universal variant layouts (solid, outline, ghost) and standard spacing and shapes.
  • ◆Interactive button feedback using physics-based spring animations.
  • ◆Dynamic display with smooth entry/exit transitions for numbers.
  • ◆Responsive layout optimized for both desktop and mobile interaction.

Notes

Important implementation details to consider.

Implementation Details
  • ◆Plan: Included in Future UI Monthly & Yearly Premium Plans.
  • ◆Import:'import { Calculator } from "@/components/ui/calculator";'
  • ◆Themes: Use the'theme'prop for distinct aesthetics ('modern', 'futuristic', 'brutal', etc.).
  • ◆Variants: Use the'variant'prop for layout structures ('solid', 'outline', 'ghost').
  • ◆Styling: Customize the look by passing a 'className'or 'primaryColor'.
  • ◆Integration: Use it as a standalone utility component in any part of your application.