Skip to main content

Claude/ChatGPT Prompt to Build a Sleep Tracker Summary Screen UI

Sleep tracker summary UI: sleep score ring, stages chart, time-in-bed vs asleep, heart-rate overlay, 3-day trend insights, and tips card.

Fill in the placeholders

Edit the values, then copy your finished prompt.

Your Prompt
prompt.txt

                                

What this prompt does

This prompt makes the model a senior mobile UI engineer building health data screens and asks it to specify a nightly sleep tracker summary tightly enough to build, returning working component code rather than pseudocode. Sleep summaries are deceptively hard: the chart is easy, but turning a noisy night into one honest sentence is the real work, so the prompt puts weight on the insight. Four variables steer it: [stack] sets the framework (React Native with Victory charts by default), [stages] lists the sleep stages to chart, [metrics] names the headline numbers, and [insight_window] sets the trend window like the last 3 nights.

The deliverables include a last-night sleep score ring with a clear good/fair/poor reading, a stages chart across the night with a heart-rate overlay toggle, a time-in-bed versus time-asleep comparison with an efficiency percentage, trend insights computed over the insight window in plain language, and a tips card that adapts to the night's weakest metric. It also asks for empty (no data), partial-night, and loading states, so a real device's messy data still renders as a calm, honest summary rather than a broken screen. Because the prompt requires working component code and a sample nightly-sleep data shape rather than pseudocode, the score ring, stages chart, and adaptive tips card all sit on a concrete data model, and putting the weight on the plain-language insight rather than the chart is what keeps the summary trustworthy when a single noisy night has to become one honest sentence.

When to use it

  • Building a nightly sleep summary screen from sensor data
  • Charting [stages] with a heart-rate overlay toggle
  • Showing a sleep score ring with a good/fair/poor reading
  • Computing plain-language trend insights over an [insight_window]
  • Adapting a tips card to the night's weakest metric
  • Handling partial-night and no-data states gracefully

Example output

You get components, props and types, and a sample nightly-sleep data shape: the sleep score ring with a good/fair/poor reading, the stages chart with a heart-rate overlay toggle, the time-in-bed versus time-asleep comparison with efficiency percentage, the plain-language trend insights over your insight window, the adaptive tips card, and the empty, partial-night, and loading states.

Pro tips

  • Spend your effort on the trend insights; vague insights erode trust faster than a missing chart.
  • Set [insight_window] to a short, honest range like the last 3 nights so trends are meaningful, not noisy.
  • List exactly the [metrics] you can compute so the screen never promises a number the sensor data lacks.
  • Make the tips card adapt to the weakest metric so advice feels specific rather than generic.
  • Define the partial-night and no-data states explicitly; real devices produce messy nights, and these states are common.
  • Keep the score ring's good/fair/poor reading simple so the headline is calm and immediately legible.

Frequently Asked Questions

What makes the sleep insights the hard part?
The chart is straightforward, but turning a noisy night of sensor data into one honest, plain-language sentence is the real work. The prompt puts the most weight on the trend insights because vague or wrong insights erode user trust faster than a missing chart.
Can I set the trend window for insights?
Yes, the `[insight_window]` variable sets the range, such as the last 3 nights. Choosing a short, honest window keeps the trends meaningful rather than noisy, and prevents the screen from overstating patterns from too little data.
Does it show sleep stages and heart rate?
Yes, the stages chart plots the stages you list in `[stages]`, such as deep, light, REM, and awake, with a heart-rate overlay toggle. The toggle lets users add heart-rate context without cluttering the default stage view.
How does it handle nights with missing data?
The prompt requires empty (no data), partial-night, and loading states. Real devices often capture incomplete nights, so these states keep the summary calm and honest instead of rendering a broken or misleading screen.
Does it return code or a description?
It returns working component code with props and types and a sample nightly-sleep data shape, not pseudocode. Set the `[stack]` to your framework and charting library, such as React Native with Victory charts, so the components fit your project.
Engr Mejba Ahmed

Need this built for real?

Engr Mejba Ahmed

AI Developer · Software Engineer

I'm Mejba — I design and ship production AI systems, automations, and full-stack apps. If you want this turned into a working solution for your team, let's talk.

More in Lifestyle App UI Prompts

Engr Mejba Ahmed

Engr Mejba Ahmed

Claude Code Expert · Online

👋

Hey there!

Quick Actions

WhatsApp Instant reply

Chat on WhatsApp

+880 1723 741224 · Instant reply

Popular Questions

Engr Mejba Ahmed is connected
Engr Mejba Ahmed is typing...
Engr Mejba Ahmed avatar

✉ Want me to follow up? Drop your email

Engr Mejba Ahmed avatar

📞 Connect Directly

Choose how you'd like to reach me

WhatsApp

+880 1723 741224

Email

[email protected]

✓ Details sent! I'll get back to you shortly.

Powered by OpenAI

335+

Blog Posts

25

AI Courses

63

Projects

Services & Expertise

Pricing & Process

Learning & Resources

Connect & Support