Skip to content
FrontendBeginnerVersion 1.0Works with any capable model

Screen to Component Plan

Break a screen description or wireframe into a component tree with props, state ownership and the states each component must handle.

When to use it

Use it before building a new screen. You describe what the screen shows and does, and the prompt proposes a component structure, decides where state should live, and lists loading, empty and error states so they are designed rather than discovered late.

When not to use it: Do not use it for a one-off static page with no state, or to generate visual design. It plans structure, not appearance. If your team already has a component library, give it the library's component names; otherwise it will invent its own.

Required inputs

PlaceholderWhat to provideExample
{{screen_description}}What the screen shows, what the user can do, and where the data comes from. A wireframe described in words is enough.Appointment list for a clinic receptionist: today's appointments in a table with status, a filter by clinician, a button to mark an appointment as arrived. Data from GET /appointments?date=.
{{framework}}The front-end framework, language and state or data-fetching approach in use.React with TypeScript, data fetched with a query library, local state with hooks.
{{existing_components}}Components or design-system parts that already exist and should be reused, or 'none'.Button, Table, Select and a Toast component exist in our shared library.

The prompt

Fill in each {{placeholder}} before you send it.

You are a front-end engineer planning how to build a screen. Produce a component plan I can review before writing code.

<screen_description>
{{screen_description}}
</screen_description>

<framework>
{{framework}}
</framework>

<existing_components>
{{existing_components}}
</existing_components>

Produce:
1. A component tree: each component with a one-line responsibility. Reuse the existing components listed above wherever they fit, and say so.
2. For each component: props (name and type), and whether it holds state.
3. State ownership: for each piece of state, which component owns it and why. Distinguish server data, URL state, form state and purely visual state.
4. Data flow: how data gets in, how user actions go out, and what happens to the screen while a request is pending or fails.
5. The states each component must handle: loading, empty, error, partial data, and permission denied if it applies.
6. Accessibility notes: keyboard operation, focus handling after actions, and what a screen reader needs announced.
7. Open questions where the description is ambiguous.

Rules:
- Use only what the description states. Do not invent API fields, routes or design details. If you need a data field that was not mentioned, list it under open questions.
- Keep the tree as small as the screen allows. Do not split a component unless it has a distinct responsibility or is reused.
- Do not write full component code. Type signatures for props are fine.
- State your assumptions about the framework where it affects the plan.

Output format (use these headings exactly):
Assumptions
Component tree
Props and state (a table: component | props | owns state)
State ownership
Data flow
States to handle
Accessibility notes
Open questions

Expected output

A compact component tree with responsibilities, a props table, an explicit decision about where each piece of state lives, and a list of loading, empty and error states per component. Good output reuses the library components you named, keeps filter state in the URL or the parent as appropriate, and ends with open questions such as what happens when an appointment cannot be marked as arrived.

Sample response (excerpt)Illustrative — your output will differ
Component tree
AppointmentsPage - owns the date and clinician filter (kept in the URL so the view can be shared)
  FilterBar - Select for clinician; no state of its own
  AppointmentTable - renders rows using the shared Table
    ArrivedButton - triggers the mark-as-arrived action for one row

States to handle
AppointmentTable: loading (skeleton rows), empty ("No appointments for this filter"), error (retry button).
ArrivedButton: pending (disabled, announced), failed (Toast with the reason).

Open questions
- Can an appointment be marked arrived more than once? What should the button show afterwards?

Limitations

  • The assistant does not see your design system or codebase, so its component boundaries may not match your conventions.
  • It can over-engineer small screens with too many components or global state. Push back on anything the screen does not need.
  • Accessibility notes are a checklist of concerns, not an audit. They cannot replace testing with a keyboard and a screen reader.
  • Advice depends on the framework version. Check any named hook or API against your version's documentation.

How to validate the output

Do these before relying on anything the model returns.

Written by
PromptFable Editorial
Last updated 13 Nov 2026
Review
Not yet reviewed

PromptFable is independent and is not affiliated with, endorsed by or sponsored by Anthropic, Google, OpenAI or any other vendor. Claude, Gemini, Google AI Studio and other product names are trademarks of their respective owners.