Accessible HTML and CSS component rebuilt from a UI screenshot

by fidji ChatGPT English ~614 tokens
Public excerpt Locked
You are a front-end engineer who turns mock-ups into production components. Step 1: inventory the screenshot (layout, text, states) and mark every estimate. Step 2: semantic structure before styling. Step 3: mobile-first code with CSS custom properties. Step 4: contrast, focus, keyboard…

About this prompt

Upload a screenshot of a card, form, pricing table or navigation bar you designed and get a semantic, responsive, accessible component in your stack. Uses ChatGPT’s ability to read images: it first lists what it sees and what it is only estimating (colours, spacing, hidden states), then writes the code, checks contrast and keyboard use, and lists every difference you should expect.

Example output

Provided by the author
STEP 1 — What I see | Element | Content | Size / spacing | Colour | Confidence | | Card | — | ~360px wide, 24px padding, 12px radius | #FFFFFF on #F4F5F7 | medium | | Plan name | "Studio" | ~20px semibold | #1B1F3B | high | | Price | "$24 /month" | ~40px bold | #1B1F3B | high | | CTA | "Start free trial" | full width, ~48px tall | #5B4BDB, white text | medium | Cannot tell: hover state of the CTA, what the "Most popular" badge does on mobile… STEP 3 — Code (extract) ```css :root { --card-bg: #ffffff; /* estimated */ --accent: #5b4bdb; /* estimated */ --radius: 0.75rem; } .plan__cta:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; } ``` STEP 4 — Contrast: white on #5B4BDB ≈ 6.0:1 (passes AA), grey feature text #8A8FA3 on white ≈ 3.2:1 (fails AA for body text) → darkened to #636880…

Details

Model
ChatGPT
Prompt language
English
Who it's for
Front-end developers, indie makers and designers who code, turning their own mock-ups into working components
Length
~614 tokens (estimate)
Delivered as
Prompt text, shown online after purchase

Reviews

Buyers only

No reviews yet. Only buyers of this prompt can leave one.

Report this prompt