UiForge
Prompt

Systeme de modals Foundry — confirmation, formulaire, plein ecran

Composants UIDark modeLinearVercelMicro-interactionsFadeReactTailwindFramer MotionRadix UI
Prêt à l'emploi

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

❯ Prompt Claude
CONTEXT & GOAL
Build the dialog system for Foundry, an internal deployment platform where engineers create environments, edit configs, and occasionally delete production resources. Three dialog types: a destructive confirmation, a form modal, and a full-screen editing dialog. Audience: SREs and developers who fear one thing above all — deleting the wrong thing. The signature idea: dialogs morph open from their trigger element (shared-layout origin animation), and destructive confirmations require typing the exact resource name, with the confirm button filling like a progress bar as the typed name matches character by character.

ART DIRECTION
Industrial control-room dark: cold steel greys, one signal-orange accent reserved exclusively for destructive intent, crisp 1px borders, no glassmorphism — surfaces feel machined, not blurred. References: Grafana's operational seriousness, Linear's dialog discipline, aircraft cockpit switch guards. The distinguishing detail is that danger has a physical cost: you cannot fat-finger a production delete because the button literally isn't armed until the name matches.

COLOR SYSTEM
Page background: #101216. Overlay: #0A0B0E at 65% opacity, 4px blur. Modal surface: #1A1D23, border 1px #2C313A. Header divider: #262B33. Text primary: #EDEFF2. Text secondary: #9AA1AC. Text muted: #5F6672. Destructive signal orange: #F76B15, hover #E05E0D, active #C95409, disarmed/disabled state #4A3324 with text #8C6B4F. Primary action blue: #4C8DFF, hover #3D7BEC, active #2F6AD9. Neutral/cancel button: transparent with border #2C313A, hover background #22262E. Input background: #14161B, border #2C313A, focus border #4C8DFF. Error text: #FF6B6B. Success: #3ECF8E. Match-progress fill on the destructive button: #F76B15 at 25% opacity growing to 100%.

TYPOGRAPHY
Modal titles Inter 18px/26px weight 600. Body text Inter 14px/22px weight 400 color #9AA1AC. Resource names and typed confirmation input in JetBrains Mono 14px weight 500 — code entities always render in mono. Button labels Inter 14px weight 600. Full-screen dialog title Inter 20px weight 600 with a mono breadcrumb "environments / prod-eu-1 / config" at 13px #5F6672. Field labels Inter 12px/16px weight 500 uppercase letter-spacing 0.04em.

LAYOUT & GRID
Confirmation modal: 440px width, 24px padding, centered. Form modal: 560px width, header 64px with title and close button, body with 20px field gaps, footer right-aligned actions with 12px gap. Full-screen dialog: covers the viewport minus a 16px inset frame (the page peeks around the edge to preserve context), internal layout is a 260px left sidebar (file tree) plus main editor pane. Mobile: all modals become bottom sheets at full width with 16px top radius; the full-screen dialog drops the inset and truly covers everything. Desktop breakpoint 1024px enables the side-by-side editor layout.

SECTIONS & COMPONENTS
Demo page: three trigger buttons in a row — "Delete environment", "New environment", "Edit config" — each opening its dialog type. Destructive confirmation: title "Delete prod-eu-1?", body "This permanently destroys the environment, its 14 running services, and 240 GB of volume data. This cannot be undone.", a mono input labeled "Type prod-eu-1 to confirm", cancel button and a destructive button "Delete environment" that starts disarmed (#4A3324, cursor not-allowed, tooltip "Type the environment name to arm") and fills with orange proportionally to the match progress, arming fully only on exact match. Form modal ("New environment"): fields Name (mono input with live slug preview "will deploy as: staging-us-2"), Region select (dropdown listing "us-east-1, eu-west-1, ap-south-1"), Tier radio group (Shared / Dedicated with price hints "$0 / $180 per month"), footer with "Cancel" and "Create environment"; submit shows a loading spinner in the button and disables all fields; server error renders an inline banner "Name already taken in this org — try staging-us-3". Full-screen dialog: YAML config editor with the file tree left, a dirty-state dot on the title when unsaved, footer bar with "Discard" and "Save and redeploy"; attempting to close with unsaved changes opens a nested confirmation ("Discard unsaved changes?") stacked above with correct focus containment. All dialogs: close via Escape, overlay click (except the destructive one, which requires an explicit cancel to prevent accidental dismissal mid-decision), and a 32px close icon button with focus-visible ring 2px #4C8DFF. Empty state in the file tree: "No config files yet — create foundry.yaml".

MOTION
Open morph: the dialog animates from the trigger's bounding box to its final centered position using a shared-layout transform, 320ms cubic-bezier(0.22,1,0.36,1), while content fades in during the last 150ms; the overlay fades in over 200ms in parallel. Destructive button arming: the orange fill width tracks match progress with a 120ms ease-out per character; on full match the button pulses scale 1 to 1.02 to 1 once over 200ms to signal armed. Full-screen dialog: rises from bottom 24px with opacity, 360ms cubic-bezier(0.16,1,0.3,1). Nested modal: parent scales down to 0.98 and dims 20% while the child opens above, 200ms. Close: reverse morph at 200ms — always faster than open. Reduced motion: all morphs become 150ms opacity fades, arming pulse is dropped (color change alone signals state), parent dimming stays (it is informational).

TECH & QUALITY
React 18, Radix UI Dialog and AlertDialog primitives for focus trapping, aria wiring, and nesting; Tailwind CSS v4; Framer Motion layoutId for the trigger-to-dialog morph. Files: DialogProvider.tsx, ConfirmDestructive.tsx, FormModal.tsx, FullscreenDialog.tsx, useDialogStack.ts. Focus is trapped per-dialog and returns to the trigger on close; the destructive dialog uses role="alertdialog" with aria-describedby pointing at the consequence text; the match input has an aria-live status announcing "armed" once matched. Contrast: #EDEFF2 on #1A1D23 is 13.8:1; the disarmed button keeps a visible 3:1 border so it is perceivable as present-but-disabled.
Objectif

Systeme complet de dialogs pour Foundry, plateforme interne de deploiement d'applications : modal de confirmation destructive, modal formulaire, et dialog plein ecran pour l'edition longue. Idee signature : chaque modal s'ouvre depuis l'element qui l'a declenche par un morphing d'origine, et les confirmations destructives exigent la frappe du nom de la ressource.

Style

Dark industriel, aciers froids et orange signal, inspire des consoles d'infrastructure

Composants
Modal de confirmation destructive avec saisie du nom de ressourceModal formulaire (creation d'environnement) avec validationDialog plein ecran pour edition de configuration YAMLOverlay avec flou et attenuationPile de modals imbriques geree (z-index et focus)Boutons d'action avec etats loading et disabledBouton de fermeture et gestion EscapePage de demonstration declenchant les trois types
Animations
Morphing d'ouverture depuis l'element declencheurFondu et zoom leger de l'overlayProgression du bouton de confirmation pendant la frappe du nomTransition du dialog plein ecran en volet montant
Stack technique
React 18Tailwind CSS v4Framer MotionRadix UI
Scores
9/10
Qualité
8/10
Originalité
Notes de revue

Force : exiger la frappe du nom exact de la ressource pour armer le bouton de suppression est une trouvaille UX forte pour un contexte infra critique, bien reliée à la barre de progression du bouton. Faiblesse : le morphing d'ouverture depuis le déclencheur est un pattern désormais assez répandu. Pas de réécriture nécessaire.

À voir aussi

Prompts liés

Composants UI

Command palette Ridgeline — recherche floue et groupes

Glass sombre flottant, halo profond, inspire de Raycast et Linear

Q 8/10O 7/10LinearGlassmorphismDark mode
Composants UI

Navbar Meridian — verre, solide et minimale

Dark glow premium inspire de Linear, aurore violette diffuse derriere un verre depoli epais

Q 9/10O 8/10LinearGlassmorphismDark mode
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