Command Palette
Search for a command to run...
Getting Started
Lofti UI is intentionally frictionless. You browse a component, copy the code, and paste. That’s it. No installation, no config layers, no hidden logic.
Project Setup (Optional)
Lofti UI works in any React environment. If you are starting a new project, here are common setups.
Vite
1npm create vite@latest my-project --template react-ts
2cd my-project
3npm installNext.js
1npx create-next-app@latest my-project --ts
2cd my-projectInstalling GSAP
Lofti UI uses GSAP because it gives us full control over motion identity—micro‑smooth easing, inertia, hover physics, cinematic timings.
1npm install gsapWhy We Use useEffect Instead of useGSAP
Lofti components are built for maximum editability. While useGSAP is convenient, it abstracts away lifecycle control and can create stacking animation contexts.
- Using
useEffectgives users full ownership of refs and timelines. - It avoids GSAP context surprises when editing or expanding animations.
- It keeps every component readable and transparent.
- You can easily extend the animation without digging through wrappers.
Lofti UI is copy‑paste first, editable always. The animation should belong to you—not a hook.
Editing / Modularizing Lofti Components
Lofti components are intentionally written in a single file so you can understand everything at a glance. But if you want a cleaner structure, you can modularize the data or config.
Example: extracting UI data into a separate file.
1// data.ts
2export const items = [
3 { label: "Home", href: "/" },
4 { label: "Work", href: "/work" },
5 { label: "Contact", href: "/contact" },
6];
7
8// component.jsx
9import { items } from "./data";
10
11export default function Nav() {
12 return (
13 <nav className="flex gap-6">
14 {items.map((item) => (
15 <a key={item.label} href={item.href}>{item.label}</a>
16 ))}
17 </nav>
18 );
19}Modularizing keeps the animation logic clean while letting you scale components without clutter.
Start Using Lofti
Copy any component → paste into your project → adjust motion → ship.