Skip to content

Mobile-first · React

Mobile app shell

A phone-first layout with a sticky top bar, four tab screens, and a bottom navigation bar.
Starter screenshot captured from this template's own build at 1440×900, plus a 390px phone capture. It shows the template as it ships, not output generated from a prompt.

What you get

Designed at 360–430px first and framed as a phone on larger screens. Includes a bottom tab bar with aria-current, safe-area insets for installed web apps, and four example screens (home cards, a search list, an activity feed and a profile with accessible switches). No router dependency — tabs are component state.

Files, exactly as copied.

Exactly what is copied into a new project: 13 files, nothing generated.

Raw data: GET /api/v1/templates/vite-react-mobile-shell

src/App.tsx
src/App.tsx
import { useState } from "react";import { Home } from "./screens/Home";import { Search } from "./screens/Search";import { Activity } from "./screens/Activity";import { Profile } from "./screens/Profile"; const TABS = [  { id: "home", label: "Home", icon: "M3 11l9-7 9 7v9a1 1 0 01-1 1h-5v-6H9v6H4a1 1 0 01-1-1z" },  { id: "search", label: "Search", icon: "M11 18a7 7 0 100-14 7 7 0 000 14zM20 20l-3.5-3.5" },  { id: "activity", label: "Activity", icon: "M12 21a9 9 0 100-18 9 9 0 000 18zM12 7v5l3 2" },  { id: "profile", label: "Profile", icon: "M12 12a4 4 0 100-8 4 4 0 000 8zM4 21a8 8 0 0116 0" },] as const;type TabId = (typeof TABS)[number]["id"]; export default function App() {  const [tab, setTab] = useState<TabId>("home");  const title = TABS.find((t) => t.id === tab)?.label ?? "";  return (    <div className="min-h-screen bg-[radial-gradient(80%_60%_at_20%_10%,#ffedd5,transparent_60%),radial-gradient(60%_50%_at_90%_90%,#fce7f3,transparent_60%)] bg-slate-50 sm:flex sm:items-center sm:justify-center sm:gap-16 sm:p-6">      <div className="hidden max-w-xs lg:block">        <p className="text-sm font-semibold text-orange-600">Mobile-first app shell</p>        <h2 className="mt-3 text-4xl font-semibold tracking-tight text-slate-900">Daybook</h2>        <p className="mt-4 leading-relaxed text-slate-600">Designed for phones first. On larger screens it is framed like a device; open it on your phone or install it to the home screen.</p>        <ul className="mt-6 space-y-2 text-sm text-slate-600">          <li>✓ Bottom tab bar with aria-current</li>          <li>✓ Safe-area insets for installed apps</li>          <li>✓ Four example screens</li>        </ul>      </div>      <div className="mx-auto flex min-h-screen w-full max-w-md flex-col overflow-hidden bg-white text-slate-900 sm:mx-0 sm:min-h-0 sm:h-[min(860px,calc(100vh-3rem))] sm:w-[400px] sm:rounded-[2.5rem] sm:border-[10px] sm:border-slate-900 sm:shadow-2xl sm:shadow-orange-900/20">        <header className="sticky top-0 z-10 bg-white/90 px-5 pb-3 pt-[max(1rem,env(safe-area-inset-top))] backdrop-blur">          <div className="flex items-center justify-between">            <h1 className="text-2xl font-semibold tracking-tight">{title}</h1>            <span aria-hidden="true" className="h-9 w-9 rounded-full bg-gradient-to-br from-orange-400 to-pink-400" />          </div>        </header>        <main className="flex-1 overflow-y-auto px-5 pb-4" role="tabpanel" aria-label={title}>          {tab === "home" ? <Home /> : tab === "search" ? <Search /> : tab === "activity" ? <Activity /> : <Profile />}        </main>        <nav className="sticky bottom-0 z-10 grid grid-cols-4 border-t border-slate-100 bg-white/95 px-2 pb-[max(0.5rem,env(safe-area-inset-bottom))] pt-1 backdrop-blur" aria-label="Primary">          {TABS.map((t) => (            <button              key={t.id}              type="button"              onClick={() => setTab(t.id)}              aria-current={tab === t.id ? "page" : undefined}              className={"flex flex-col items-center gap-1 rounded-xl py-2 text-[11px] font-medium transition " + (tab === t.id ? "text-orange-600" : "text-slate-400 hover:text-slate-700")}            >              <svg viewBox="0 0 24 24" className="h-6 w-6" fill={tab === t.id ? "currentColor" : "none"} fillOpacity={0.12} stroke="currentColor" strokeWidth={1.8} strokeLinecap="round" strokeLinejoin="round" aria-hidden="true">                <path d={t.icon} />              </svg>              {t.label}            </button>          ))}        </nav>      </div>    </div>  );}

Remix

Remix this template.

Describe what to change and the agent starts from Mobile app shell's files. The box is already started for you: finish “Start from Mobile app shell and …”

Agent ready

Creates a free account first; your idea is carried over.

Dependencies

Documented from the template's package.json. The runtime has a prebuilt dependency set for Vite + React + TypeScript, so installs are fast.

  • react^19.1.0
  • react-dom^19.1.0
  • vite^6.3.0
  • @vitejs/plugin-react^4.4.0
  • tailwindcss^4.1.0
  • @tailwindcss/vite^4.1.0
  • typescript^5.8.0

How it runs

Framework
Vite + React + TypeScript
Dev command
npm run dev
Build command
npm run build
Output directory
dist
Port
5173
Entry route
/

Projects run in an isolated sandbox with a live preview. Read the projects documentation for settings, snapshots and deployment.

All templates

Build on Mobile app shell

Create a free account, start from this template, and ask the AI agent to turn it into your app.