frootui
v1.0.4
Published
Stripe-inspired modular UI component library and CLI for FrootKit, Preact, and React
Maintainers
Readme
FrootUI (⚡)
Stripe-Inspired Modular Component Library & CLI for FrootKit, Preact, and React
FrootUI is a modern, structured UI library and component generator inspired by shadcn/ui and crafted around the Stripe Design System.
Features
- ⚡ Stripe Design System: Authentic voltage accent (
#533afd), multi-layer blue-tinted shadows, tabular numbers, clean micro-borders, and slanted ribbon accents. - 📦 Dual-Mode (Package or Copy/Paste CLI):
- Import directly:
import { Button, Card, Badge } from 'frootui'; - Or scaffold locally with zero lock-in:
npx frootui add button card
- Import directly:
- 🎨 Complete Theme Customizability: Full support for CSS variables and Tailwind CSS v4
@themedirectives with dark mode out-of-the-box. - 🚀 Ultra-Fast & Lightweight: Zero external runtime overhead; SSR-safe and optimized for Preact VNodes and React.
- 🛡 Fully Typed: First-class TypeScript definitions for all props, variants, and compound variants via
cva.
Quickstart
1. Initialize FrootUI in your project
npx frootui initThis generates frootui.json, initializes src/components/ui/, creates src/utils/cn.ts, and injects Stripe tokens into your styles.css.
2. Add components locally (shadcn-style)
npx frootui add button card badge input tableOr add the entire suite at once:
npx frootui add --all3. Or install as an NPM package
npm install frootuiComponent Suite
| Component | Description |
| :--- | :--- |
| Button | Stripe Voltage Indigo button with bevels, secondary, outline, ghost, danger |
| Badge | Stripe status badges (success, warning, danger, info, voltage, neutral) |
| Card | Stripe surface card with micro-borders, optional top accent gradient bar |
| Input | Form input with Stripe voltage focus glow |
| Table | Stripe Dashboard data table with tabular figures (tabular-nums) |
| MetricCard | Stripe Analytics KPI card with delta badge (+14.2%) and sparkline |
| Tabs | Stripe underline and pill tabs |
| Dialog | Accessible modal dialog with backdrop blur |
| Alert | Semantic status alert with SVG icons |
| Avatar | User avatar with fallback initials and online/offline status dot |
| Separator | Hairline border divider with optional label |
| StripeMesh | Stripe signature slanted ribbon and mesh gradient hero container |
Example Usage
import {
Button,
Card,
CardHeader,
CardTitle,
CardContent,
Badge,
Input,
MetricCard,
StripeMesh
} from 'frootui';
export default function Dashboard() {
return (
<div class="space-y-6">
{/* Stripe Slanted Mesh Header */}
<StripeMesh slantAngle={-6} gradient="mesh" class="py-12 px-6 rounded-2xl text-white">
<h1 class="text-3xl font-semibold tracking-tight">Financial Infrastructure</h1>
<p class="text-white/80 text-sm mt-2">Real-time payments and telemetry reconciliation.</p>
</StripeMesh>
{/* Stripe KPI Metric Cards */}
<div class="grid grid-cols-1 md:grid-cols-3 gap-4">
<MetricCard
label="Net Volume"
value="$128,420"
change="+18.4%"
isPositive={true}
context="vs last 30 days"
sparklineData={[10, 25, 40, 35, 60, 85, 120]}
/>
<MetricCard
label="Active Subscriptions"
value="4,821"
change="+8.2%"
isPositive={true}
context="342 new this week"
/>
<MetricCard
label="Dispute Rate"
value="0.04%"
change="-0.01%"
isPositive={true}
context="Well below threshold"
/>
</div>
{/* Card with Voltage Button */}
<Card accentTop>
<CardHeader>
<div class="flex items-center justify-between">
<CardTitle>API Access Credentials</CardTitle>
<Badge variant="voltage" dot>Production Mode</Badge>
</div>
</CardHeader>
<CardContent class="space-y-4">
<Input label="Publishable Key" defaultValue="pk_live_froot_5109..." readOnly />
<Button variant="primary">Roll Secret Key</Button>
</CardContent>
</Card>
</div>
);
}CLI Reference
# Initialize FrootUI
npx frootui init
# List available components
npx frootui list
# Add specific components
npx frootui add button card input table
# Add all components
npx frootui add --allLicense
MIT © OrbitNorth LLC
