UiForge
Prompt

Langage de micro-interactions Pulse — boutons, toggles, toasts

Composants UIMinimalAppleLinearMicro-interactionsHover effectReactTailwindFramer Motion
Prêt à l'emploi

Copie le prompt dans le presse-papier, sans quitter la page.

❯ Prompt Claude
CONTEXT & GOAL
Build the Pulse micro-interaction library: a unified motion language for a productivity app, demonstrated on an interactive playground page. Components: buttons, toggles, checkboxes, radio groups, steppers, floating-label fields, stacked toasts. Audience: design engineers adopting this as their app's physical vocabulary. The signature idea: one spring signature — stiffness 420, damping 26 — drives every interaction, so the interface feels carved from one elastic material; the playground displays the live spring curve reacting as you interact.

ART DIRECTION
Tactile graphite monochrome: depth comes from motion, not color — greys plus one ink accent, forcing the physics to carry the personality. References: Apple's rubber-band physics, Rauno Freiberg's interaction craft, mechanical keyboard switch feel in pixels. What distinguishes it from a component zoo: the enforced single-spring constraint, stated on the page.

COLOR SYSTEM
Playground background: #F2F2F0. Panel surface: #FFFFFF, border #E4E4E0. Ink accent (active states, checked fills): #1A1A1A, hover #333333, pressed #000000. Text primary: #1A1A1A, secondary #6E6E68, muted #A5A5A0. Toggle track off: #D9D9D4, track on: #1A1A1A, thumb: #FFFFFF with shadow 0 1px 3px rgba(0,0,0,0.18). Checkbox unchecked border: #B8B8B2, checked fill: #1A1A1A, check stroke: #FFFFFF. Toast surface: #1A1A1A, toast text: #F2F2F0, success tick: #4ADE80, error tick: #F87171, undo link: #A5B4FC. Field border: #D9D9D4, focus border: #1A1A1A, error border: #DC2626 with message #B91C1C. Disabled anything: 38% opacity. Focus-visible ring: 2px #1A1A1A offset 2px on light, inverted on dark toasts. Spring-curve visualizer line: #1A1A1A on a #FAFAF8 grid.

TYPOGRAPHY
Playground title Space Grotesk 32px/38px weight 600 ("Pulse — one spring, every surface"). Section labels Space Grotesk 13px weight 600 uppercase letter-spacing 0.1em color #6E6E68. Component labels Inter 14px/20px weight 500. Button labels Inter 14px weight 600. Toast text Inter 13px/19px weight 500. Stepper digits JetBrains Mono 16px weight 600 tabular-nums. Field labels Inter 13px floating to 11px. Code annotations under each demo (the spring values) JetBrains Mono 11px color #A5A5A0.

LAYOUT & GRID
Playground: max-width 960px centered, 24px padding, a responsive grid of demo panels — 2 columns desktop, 1 under 768px, 20px gaps. Each panel: 24px padding, 12px radius, the live component centered in a 120px stage, its name, a one-line behavior note, and its mono annotation ("spring(420, 26) — compress 0.97"). A sticky footer bar hosts the toast triggers and the "reduce motion" preview toggle. The spring-curve visualizer spans both columns: a 160px live graph of the last interaction's spring response.

SECTIONS & COMPONENTS
Button panel: primary "Save changes" — hover raises 1px with shadow growth, press compresses to 0.97 with the spring, release fires a ring wave expanding from the bounds fading over 400ms; disabled and loading (three-dot pulse) variants beside it. Toggle panel: 44x24px track, the thumb stretches into a 22x16px pill during travel then snaps round on arrival; track color crossfades; Space triggers the same travel; disabled variant shown. Checkbox panel: 20px box, press squashes to 0.9, the white check draws along its path in 180ms as the box rebounds; unchecking reverses; indeterminate shows a dash that morphs into the check. Radio panel: four options ("Instant / Hourly / Daily / Weekly") where the filled dot travels from the previous option to the new one along a connecting line, squashing on arrival. Stepper panel: minus/plus buttons flank a drum-rolling counter, direction-aware; at min/max the relevant button disables and an over-press nudges the counter 2px. Field panel: the inside label springs up to 11px on focus, overshooting 1px before settling; error ("Name can't be empty") slides in with the border change; success shows a brief check. Toast triggers: "Saved", "Deleted — Undo", "Connection lost" (error, persistent); toasts stack bottom-right in perspective — 3 visible, older ones scale 0.95/0.9 and rise 8px/16px behind, the newest landing with a squash-and-settle; swipe or X dismisses, hover pauses auto-dismiss (4s). Every component renders its focus-visible state and works keyboard-only. Empty state: the toast stage reads "Trigger a toast to feel the stack".

MOTION
Global constants: spring(stiffness 420, damping 26, mass 1) for ALL primary movement; micro-fades 120ms linear; nothing else permitted — this constraint is the design. Button press: scale 0.97 on pointerdown; release wave: box-shadow ring 0 to 12px spread fading 400ms ease-out. Toggle travel: thumb x plus width stretch via the spring, stretch proportional to distance. Checkbox draw: stroke-dashoffset 180ms ease-out synchronized with the box rebound. Radio travel: dot translates along the axis with the spring, squash scaleX 1.2/scaleY 0.8 on arrival. Stepper roll: digit column translates one line-height per step; rapid clicks queue (cap 3 per spring cycle). Toast landing: translateY 24px to 0 plus scaleY 0.92 to 1, siblings re-target with the same spring. The visualizer plots displacement-vs-time live. Reduced motion (and the preview toggle): every spring becomes a 100ms opacity or instant change, wave and stretch dropped, toasts fade in place, the visualizer shows a flat line "reduced motion active".

TECH & QUALITY
React 18, Tailwind CSS v4, Framer Motion with a single exported springPulse constant imported by every component (lib/motion.ts) so the physics cannot drift. Files: playground/page.tsx, components/pulse/(Button|Toggle|Checkbox|RadioGroup|Stepper|Field|Toaster).tsx, lib/motion.ts, SpringVisualizer.tsx. All controls are native elements or ARIA-correct equivalents: the toggle is a button role="switch" aria-checked, the stepper input is a spinbutton with aria-valuemin/max/now, toasts render into an aria-live="polite" region (the error toast uses role="alert"), and every focus-visible state is designed, not default. Contrast: #1A1A1A on #F2F2F0 is 15.7:1; toast text passes 14:1; disabled states keep a 3:1 perceivable footprint. The playground documents each component's keyboard map in a details disclosure.
Objectif

Bibliotheque de micro-interactions pour Pulse, un langage de motion unifie destine a une app de productivite : boutons, toggles, checkboxes et toasts partagent la meme physique. Idee signature : tout repose sur une seule et meme signature de ressort (stiffness 420, damping 26) declinee partout, si bien que l'interface entiere semble faite d'une seule matiere elastique.

Style

Monochrome graphite tactile, profondeur par le mouvement plutot que la couleur

Composants
Bouton avec compression physique et onde de relachementToggle a bille avec etirement de la pisteCheckbox avec coche dessinee et rebond de la boiteRadio group avec bille voyageant entre les optionsToast empilables avec pile en perspectiveCompteur stepper avec chiffres roulantsChamp avec label flottant physiquePage de demonstration en terrain de jeu interactif
Animations
Compression du bouton a l'appui et onde au relachementEtirement de la bille du toggle pendant le glissementTrace de la coche en un trait avec sursaut de la boiteChiffres roulants du stepper en tambourEmpilement en perspective des toasts avec ecrasement du dernier
Stack technique
React 18Tailwind CSS v4Framer Motion
Scores
9/10
Qualité
8/10
Originalité
Notes de revue

Force : la contrainte d'un seul spring (stiffness 420, damping 26) pour toute l'interface est une idée disciplinée, bien démontrée par le visualiseur de courbe en direct. Faiblesse : le format « playground de micro-interactions » reste un exercice classique de démonstration de composants. Pas de changement nécessaire.

À voir aussi

Prompts liés

Composants UI

Onglets élastiques et fil d'Ariane – Helvetiq Docs

Light suisse minimal, blanc et gris neutres, rouge hélvétique en accent unique, précision typographique.

Q 9/10O 9/10MinimalAppleVercel
Composants UI

Sidebar de navigation Quill — repliable avec sections et compteurs

Light suisse chaleureux, blanc casse et encre, accents par section facon dos de livres

Q 9/10O 9/10MinimalAppleStripe
Composants UI

Board kanban Slipstream — colonnes, cartes et drag & drop

Dark neon arcade maitrise, violet electrique sur anthracite, energie sans chaos

Q 9/10O 9/10Dark modeFuturisticLinear