Models 44

Gemini 3.1 Flash Lite

by GoogleReasoningClean
Open in new window

Running live in a sandboxed frame. Click inside it before using the keyboard.

How it went

Total time
4.3 s
Cost
$0.0027
Output tokens
1,687
Spent thinking
0 tokens
Speed
434.6 tok/s
Console errors
0
First token after
373 ms
First visible text after
373 ms
Prompt tokens
507
Code size
5.5 KB
Finish reason
stop
Served by
Google
Model id
google/gemini-3.1-flash-lite
Reasoning sent
model default
Max output
65,536 tokens
Generated
Nov 12, 2026

What it was asked

The prompt
Build an interactive Kanban board in vanilla HTML, CSS and JavaScript (no framework, no library). Requirements: - Three columns: "To do", "In progress", "Done", each showing its card count. - Pre-populate the board with 6 realistic cards spread across the columns so the first screenshot looks alive. - Each card has a title and a priority (low / medium / high) shown as a colored badge. - Add a card through a small modal form (title required), and delete a card with a button on it. - Drag and drop cards between columns with the mouse, with a clear visual drop indicator. - A search field that filters cards live by title. - A light / dark theme toggle. - State lives in memory only (no storage APIs).
System prompt, sent with every prompt
You are generating a self-contained web demo. It will be rendered automatically in a sandboxed iframe and compared side by side with the output of other AI models given the exact same task.

Output rules:
- Reply with exactly ONE fenced code block containing the complete file: ```html (or ```svg when the task asks for an SVG). No text before or after the code block.
- Everything must be inline: CSS in <style>, JavaScript in <script>. No external files, images, fonts or network requests, except the CDN URLs explicitly allowed by the task.
- Do not use localStorage, sessionStorage, cookies, IndexedDB, alert(), confirm(), prompt() or window.open(): they are blocked in the sandbox and will throw.
- The page must look right in a 1280×800 viewport and adapt gracefully down to 375px wide. No horizontal scrollbar.
- Something meaningful must be visible on first paint: a screenshot is taken automatically about 3 seconds after load, without any interaction.
- Everything that makes the demo interesting must be visible within the first seconds: nothing hidden behind a high score, a later level or a long play session.
- Games must start in a self-playing demo mode (a simple AI plays) behind a "Click or press a key to start" message, so the game can be judged in action without playing.
- The iframe only receives keyboard events after the user clicks it: if the demo uses the keyboard, display a clear "Click or press a key to start" message.
- The code must run with zero errors in the console of the latest Chrome.

Code run-1.html · 114 lines

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Kanban Board</title>
    <style>
        :root { --bg: #f4f7f6; --card: #fff; --text: #333; --border: #ddd; --primary: #4a90e2; }
        .dark { --bg: #1a1a1a; --card: #2d2d2d; --text: #e0e0e0; --border: #444; }
        body { font-family: sans-serif; background: var(--bg); color: var(--text); transition: 0.3s; margin: 0; padding: 20px; }
        header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
        .controls { display: flex; gap: 10px; align-items: center; }
        .board { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; align-items: start; }
        .column { background: rgba(0,0,0,0.05); padding: 15px; border-radius: 8px; min-height: 500px; }
        .card { background: var(--card); padding: 15px; margin-bottom: 10px; border-radius: 6px; box-shadow: 0 2px 4px rgba(0,0,0,0.1); cursor: grab; border-left: 5px solid var(--primary); }
        .card.dragging { opacity: 0.5; }
        .badge { font-size: 10px; padding: 2px 6px; border-radius: 4px; text-transform: uppercase; margin-right: 5px; }
        .high { background: #ffcccc; color: #a00; } .medium { background: #fff3cc; color: #a60; } .low { background: #d4edda; color: #060; }
        .modal { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); justify-content: center; align-items: center; }
        .modal-content { background: var(--card); padding: 20px; border-radius: 8px; width: 300px; }
        input, select, button { padding: 8px; margin: 5px 0; width: 100%; box-sizing: border-box; }
        .delete-btn { color: red; cursor: pointer; float: right; border: none; background: none; }
    </style>
</head>
<body>

<header>
    <h1>Kanban</h1>
    <div class="controls">
        <input type="text" id="search" placeholder="Search tasks...">
        <button onclick="toggleTheme()">Theme</button>
        <button onclick="openModal()">+ Add Task</button>
    </div>
</header>

<div class="board">
    <div class="column" id="todo" ondragover="event.preventDefault()" ondrop="drop(event, 'todo')">
        <h3>To do (<span id="count-todo">0</span>)</h3>
        <div class="tasks"></div>
    </div>
    <div class="column" id="inprogress" ondragover="event.preventDefault()" ondrop="drop(event, 'inprogress')">
        <h3>In progress (<span id="count-inprogress">0</span>)</h3>
        <div class="tasks"></div>
    </div>
    <div class="column" id="done" ondragover="event.preventDefault()" ondrop="drop(event, 'done')">
        <h3>Done (<span id="count-done">0</span>)</h3>
        <div class="tasks"></div>
    </div>
</div>

<div class="modal" id="modal">
    <div class="modal-content">
        <h3>New Task</h3>
        <input type="text" id="taskTitle" placeholder="Task Title">
        <select id="taskPriority"><option>low</option><option>medium</option><option>high</option></select>
        <button onclick="addTask()">Save</button>
        <button onclick="closeModal()">Cancel</button>
    </div>
</div>

<script>
    let tasks = [
        {id:1, title:"Fix UI bug", status:"todo", priority:"high"},
        {id:2, title:"Design System", status:"todo", priority:"medium"},
        {id:3, title:"API Integration", status:"inprogress", priority:"high"},
        {id:4, title:"Write Docs", status:"inprogress", priority:"low"},
        {id:5, title:"Deploy Server", status:"done", priority:"medium"},
        {id:6, title:"Client Meeting", status:"done", priority:"high"}
    ];

    function render() {
        const query = document.getElementById('search').value.toLowerCase();
        ['todo', 'inprogress', 'done'].forEach(status => {
            const container = document.querySelector(`#${status} .tasks`);
            const filtered = tasks.filter(t => t.status === status && t.title.toLowerCase().includes(query));
            container.innerHTML = '';
            filtered.forEach(t => {
                const card = document.createElement('div');
                card.className = 'card';
                card.draggable = true;
                card.id = `card-${t.id}`;
                card.ondragstart = (e) => e.dataTransfer.setData('text', t.id);
                card.innerHTML = `<button class="delete-btn" onclick="deleteTask(${t.id})">✕</button>
                                  <span class="badge ${t.priority}">${t.priority}</span> <strong>${t.title}</strong>`;
                container.appendChild(card);
            });
            document.getElementById(`count-${status}`).innerText = filtered.length;
        });
    }

    function drop(e, status) {
        const id = parseInt(e.dataTransfer.getData('text'));
        tasks.find(t => t.id === id).status = status;
        render();
    }

    function addTask() {
        const title = document.getElementById('taskTitle').value;
        if (!title) return;
        tasks.push({id: Date.now(), title, status: 'todo', priority: document.getElementById('taskPriority').value});
        closeModal();
        render();
    }

    function deleteTask(id) { tasks = tasks.filter(t => t.id !== id); render(); }
    function openModal() { document.getElementById('modal').style.display = 'flex'; }
    function closeModal() { document.getElementById('modal').style.display = 'none'; }
    function toggleTheme() { document.body.classList.toggle('dark'); }
    
    document.getElementById('search').oninput = render;
    render();
</script>
</body>
</html>