Skip to content
Agents tracked: 440 Downloads (7d): 202M down 19.5% GitHub stars: 10.4M Releases (7d): 607 Agent status: 1 with issuesSince last limit reset: Claude 28d · Codex 0d Updated Oct 21, 2026

Base UI Examples You Can Edit and Run

5 small Base UI examples written by AgentGid from the official docs, one feature each. Every one runs in your browser: change the code and see the result at once, or describe a change and let AI rewrite it. The screenshots are taken from the same code by our server, which also checks that each example starts without errors.

Base UI: usage and stats 126 AI-built projects use it

Try them all in one place

import { Popover } from '@base-ui/react';

const css = `
.trigger { height: 36px; padding: 0 16px; border: 1px solid #fff; background: #1f1f1f;
  color: #fff; font: 500 14px system-ui; border-radius: 8px; cursor: pointer; }
.trigger:focus-visible { outline: 2px solid #60a5fa; outline-offset: 2px; }
.popup { width: 240px; padding: 14px 16px; background: #fff; color: #111; border-radius: 10px;
  box-shadow: 0 10px 30px rgb(0 0 0 / 40%); font-family: system-ui; position: relative;
  transition: opacity 150ms, transform 150ms; }
.popup[data-starting-style], .popup[data-ending-style] { opacity: 0; transform: scale(0.96); }
.arrow { position: absolute; width: 12px; height: 12px; background: #fff; transform: rotate(45deg); }
.arrow[data-side='bottom'] { top: -6px; }
.title { margin: 0 0 4px; font-size: 15px; }
.desc { margin: 0; font-size: 14px; color: #444; }
`;

export default function App() {
  return (
    <div style={{ height: 360, display: 'flex', justifyContent: 'center', paddingTop: 90,
      background: '#111', boxSizing: 'border-box' }}>
      <style>{css}</style>
      <Popover.Root defaultOpen>
        <Popover.Trigger className="trigger">Notifications</Popover.Trigger>
        <Popover.Portal>
          <Popover.Positioner sideOffset={10}>
            <Popover.Popup className="popup">
              <Popover.Arrow className="arrow" />
              <Popover.Title className="title">Notifications</Popover.Title>
              <Popover.Description className="desc">
                You are all caught up. Good job!
              </Popover.Description>
            </Popover.Popup>
          </Popover.Positioner>
        </Popover.Portal>
      </Popover.Root>
    </div>
  );
}
Ctrl/⌘ + Enter runs

Free for signed-in members, with a daily limit. Describe the change in plain words; the new code runs only in your browser.

The popover starts open via defaultOpen; click the button or press Esc to close it. Code written by AgentGid [1]. How it works, with a screenshot →

Checked Oct 12, 2026: each example starts without errors in Chromium with @base-ui/react 1.9.0, react 19.3.0, react-dom 19.3.0. Needs WebGL.

Sources

  1. Docs: Quick start
  2. Docs: About Base UI
  3. Docs: Accessibility
  4. Base UI website

Explanations written by AgentGid from the official docs; the numbers in brackets point here. The code marked "written by AgentGid" is ours and free to copy.

Building something with Base UI? Ask AgentGid →