Guides

Rapid prototyping with Grok Build

View as Markdown

Prototyping with Grok Build is a conversation. Describe what you want, watch it build, see the result in your browser, iterate.

Plan Mode explores the idea and figures out what to build. The browser tool shows you what you're building as it develops. Auto-run closes the loop: Grok Build runs the code, sees the result, and fixes issues without waiting for you.

Plan mode for scoping prototypes

Start with Plan Mode (Shift+Tab, then select Plan) when you have an idea but haven't figured out exactly what to build. Grok Build explores the problem space, asks clarifying questions, and creates a structured plan before writing code.

Plan mode example: Explore with Plan Mode
I want to build a tool that visualizes our API response times. Explore how we'd build this: what data we'd need, how we'd display it, and what the simplest version looks like.
See the agent's response
Searched codebase API response time monitoring
Read src/middleware/timing.ts
I need to ask a few questions to create an accurate plan:
A) Data source - Where should timing data come from?
•a) Existing timing.ts middleware (already logs to console)
•b) New middleware that stores to database
•c) External APM service (Datadog, etc.)
Default: Option a, extend existing middleware
B) Display format - How should the data be shown?
•a) Real-time line chart
•b) Table with sorting/filtering
•c) Percentile dashboard (P50, P95, P99)
Default: Table view for simplicity
C) Scope - What endpoints to track?
•a) All endpoints
•b) Only slow endpoints (>100ms)
•c) Specific routes I choose
Default: All endpoints

Plan Mode is useful when:

  • You're not sure what the prototype should do
  • You want to compare different approaches before committing
  • The idea spans multiple components and you need to scope it

Review the plan, adjust priorities, then execute. For simple prototypes, skip straight to building.

Plan mode example: Plan a demo
We need to demo a document collaboration feature to a client. Plan out what the prototype should show: real-time editing, comments, version history. What's the simplest version that demonstrates the value?
See the agent's response
Searched real-time collaboration libraries comparison
I need to ask a few questions to scope this demo:
A) Real-time library - What should power the collaboration?
•a) Liveblocks (easiest setup, free tier)
•b) Yjs (open source, more control)
•c) Mock it with setTimeout (fastest to build)
Default: Liveblocks
B) Editor component - What type of document?
•a) Rich text (Tiptap/Slate)
•b) Plain text
•c) Markdown
Default: Rich text with Tiptap
C) Features to include:
•a) Grok Build presence + live sync only
•b) Add comments (mocked)
•c) Add version history (mocked)
Default: Grok Build presence + live sync

Building with the browser tool

The browser tool lets Grok Build see what it's building. Instead of writing code and hoping it looks right, Grok Build renders the UI, sees the result, and adjusts.

Agent example: Visual prototyping
Build a dashboard that shows sales metrics. Use placeholder data. Open it in the browser and iterate on the layout until it looks good.
See the agent's response
Thought for 2s
I'll create a sales dashboard with placeholder data. Let me start with a basic layout - header, key metrics cards, and a chart.
CreatedDashboard.tsx+45
export function Dashboard() {
  const metrics = [
    { label: 'Revenue', value: '$124,500', change: '+12%' },
    { label: 'Orders', value: '1,429', change: '+8%' },
    { label: 'Customers', value: '892', change: '+23%' },
  ];
  return (
    <div className="p-6 space-y-6">
      {/* ... */}
    </div>
  );
}
Ran npm run dev
Browsed localhost:3000/dashboard
Thought for 1s
The layout is there but the cards are too cramped. I'll add more padding and make the metrics cards use a grid layout.
EditedDashboard.tsx+3-2
    <div className="p-6 space-y-6">
    <div className="p-8 space-y-8 max-w-7xl mx-auto">
      <div className="grid gap-4">
      <div className="grid gap-4">
      <div className="grid grid-cols-1 md:grid-cols-3 gap-6">
Browsed localhost:3000/dashboard (refreshed)
Done! The dashboard now has:
•Three metric cards in a responsive grid
•Proper spacing and max-width container
•Placeholder chart area
The layout looks balanced on desktop. Want me to add the actual chart or adjust the mobile view?

The browser tool captures accessibility snapshots, not only screenshots. Grok Build understands the structure of the page: what's clickable, what's editable, how elements relate. It can interact with the prototype, click through flows, and catch issues you'd miss looking at code.

Agent example: Click through a prototype
Build a checkout flow prototype. Walk through the entire flow in the browser: add item to cart, enter shipping info, enter payment, confirm order. Fix anything that doesn't work.
See the agent's response
CreatedCart.tsx+62
export function Cart() {
  const [items, setItems] = useState(sampleItems);
  // ...
Browsed localhost:3000/cart
Thought for 1s
Cart page looks good. Let me click 'Checkout' and build the shipping form.
CreatedShipping.tsx+48
export function ShippingForm() {
  return (
    <form onSubmit={handleSubmit}>
      // ...
Browsed localhost:3000/checkout/shipping (clicked Continue)
Thought for 1s
The form validation isn't working - it's letting me proceed with empty fields. Let me fix that.
EditedShipping.tsx+8-2
  const handleSubmit = (e) => {
  const handleSubmit = (e) => {
    e.preventDefault();
    if (!validateFields()) return;
Browsed localhost:3000/checkout/shipping (tested validation)
The checkout flow is working:
•Cart page with item list and totals
•Shipping form with validation
•Payment form (Stripe test mode)
•Order confirmation page
I fixed a validation issue where the shipping form was submitting with empty fields. All steps are now clickable and functional.
Agent example: Visual polish
The spacing on this form feels off. Open it in the browser and adjust the layout until it looks balanced.
See the agent's response
Browsed localhost:3000/settings
Thought for 1s
The form fields are too close together and the labels aren't aligned. The submit button is also too close to the last field.
EditedSettingsForm.tsx+5-3
    <div className="space-y-2">
    <div className="space-y-6">
      <label className="...">
    <button className="mt-2">
    <button className="mt-8">
Browsed localhost:3000/settings (refreshed)
Better. I increased the spacing between form fields from 2 to 6, and added more margin above the submit button. The form feels more balanced now.

Demo prototypes for stakeholders

Grok Build can build demo-quality prototypes that show a concept without backend infrastructure.

Agent example: Client presentation prototype
I'm presenting to a client about a customer analytics dashboard. Build a prototype with realistic-looking data that I can click through during the presentation.
See the agent's response
Thought for 2s
This is for a client presentation, so it needs to look polished with realistic data. I'll create a dashboard with charts, tables, and some interactive filters.
CreatedAnalyticsDashboard.tsx+120
const sampleCustomers = [
  { name: 'Acme Corp', revenue: 124500, growth: 12 },
  { name: 'Globex Inc', revenue: 98200, growth: 8 },
  // ...
CreatedRevenueChart.tsx+45
export function RevenueChart({ data }) {
  return <LineChart data={data} ... />
Browsed localhost:3000/analytics
The analytics dashboard is ready for your presentation:
•Customer overview with key metrics
•Revenue chart showing monthly trends
•Sortable customer table
•Date range filter that updates all charts
The data looks realistic - company names, plausible revenue figures, and growth percentages that tell a story.
Agent example: Interactive demo
Create a prototype of this user flow: user logs in, sees their dashboard, clicks on a report, exports it as PDF. Mock the data but make the interactions work.
See the agent's response
CreatedLogin.tsx+35
export function Login() {
  const handleSubmit = () => navigate('/dashboard');
  // ...
CreatedDashboard.tsx+55
const reports = [
  { id: 1, name: 'Q4 Sales Report', date: '2024-01-15' },
  // ...
Browsed localhost:3000/login (testing flow)
Browsed localhost:3000/dashboard (clicked report)
Browsed localhost:3000/reports/1 (clicked Export PDF)
The user flow is complete:
1.Login page (any credentials work for the demo)
2.Dashboard with list of reports
3.Report detail page with charts
4.Export PDF button (downloads a mock PDF)
All interactions work - you can click through the entire flow.
Agent example: Realistic sample data
Add sample data to this dashboard. Use realistic company names, plausible dates, and numbers that show an interesting trend. I want it to look like a real product.
See the agent's response
Read src/data/mockData.ts
EditedmockData.ts+85-12
export const companies = ['Company A', 'Company B'];
export const companies = [
  { name: 'Meridian Technologies', industry: 'SaaS', founded: 2019 },
  { name: 'Northstar Logistics', industry: 'Supply Chain', founded: 2015 },
  { name: 'Cascade Analytics', industry: 'Data', founded: 2021 },
  // ... 12 more companies
I've replaced the placeholder data with realistic samples:
•15 companies with real-sounding names across different industries
•Revenue figures that follow a believable distribution
•Growth trends showing Q3 dip and Q4 recovery
•Dates spanning the last 18 months
The dashboard now looks like it's showing real product data.

Prototyping for non-developers

PMs, designers, and analysts use Grok Build to build working prototypes without writing code themselves. The prompts focus on describing outcomes rather than implementation.

Agent example: Data visualization
I have this data in a CSV. Build a web page that shows it as a bar chart. Let me filter by date range and export the filtered data.
See the agent's response
Read data/sales_q4.csv
Thought for 1s
The CSV has columns for date, region, product, and amount. I'll create a bar chart grouped by region with a date filter.
CreatedSalesChart.tsx+75
export function SalesChart({ data }) {
  const [dateRange, setDateRange] = useState({ start: null, end: null });
  const filtered = filterByDateRange(data, dateRange);
  // ...
Browsed localhost:3000/sales
Done! The page shows your CSV data as a bar chart grouped by region. You can:
•Filter by date range using the picker
•Hover over bars for exact values
•Click 'Export' to download the filtered data as CSV

With MCP integrations, Grok Build can connect directly to Figma to read your designs. Browse the Marketplace to set up the Figma integration.

Agent example: Figma to prototype
Build a working version of figma.com/file/abc123/hom... I can click through. It doesn't need a backend, just the UI and interactions.
See the agent's response
Figma MCP get_file homepage-redesign
Thought for 2s
The design has a hero section, feature grid, and pricing table. I'll match the spacing, colors, and typography from the Figma file.
CreatedLanding.tsx+145
export function Landing() {
  return (
    <div className="bg-slate-950 text-white">
      <Hero />
      <Features />
      <Pricing />
Browsed localhost:3000
I've built the landing page from your Figma design:
•Hero with gradient background matching your specs
•3-column feature grid with icons
•Pricing table with hover states
The spacing and colors match the design file. All buttons are clickable for the demo.

When something looks wrong, describe what's wrong rather than how to fix it:

Agent example: Iterate by describing problems
The header is too big and the sidebar should collapse on mobile. The colors don't match our brand guide.
See the agent's response
Browsed localhost:3000
EditedHeader.tsx+2-2
    <header className="h-24 text-2xl">
    <header className="h-16 text-lg">
EditedSidebar.tsx+12-3
  const [collapsed, setCollapsed] = useState(isMobile);
  useEffect(() => setCollapsed(isMobile), [isMobile]);
Editedtailwind.config.js+4-4
        primary: '#3b82f6',
        primary: '#6366f1',
Browsed localhost:3000 (mobile view)
Fixed all three issues:
•Header height reduced from 96px to 64px
•Sidebar now collapses automatically on screens under 768px
•Updated primary color to match your brand guide (#6366f1)

Getting started

  1. Use Plan Mode to scope. When you're not sure what to build, Plan Mode explores the problem and creates a roadmap before writing code.

  2. Enable the browser tool. Grok Build can iterate on visual details without you describing every adjustment.

  3. Enable Auto-run. Let Grok Build run code, see results, and fix issues in a continuous loop.

  4. Describe outcomes, not implementation. "Build a dashboard showing X" works better than specifying every component.

  5. Iterate in conversation. Describe what to change: "Make this bigger," "Add a filter for date," "The flow should start here instead."


Last updated: November 23, 2026