Generating portfolio for Alfie Martin...

31%

Loading
Loading
Back to Home

Design System Playground

Developer Handoff

Live-edit component variants and styling tokens to see changes reflected in real-time across UI patterns.

Why this exists

I built this system because I was rebuilding the same five things on every project. Buttons that almost matched. Spacing that drifted by 2px between screens. Form fields with three different focus states depending on which file I copied from. The playground is where I keep the canonical versions. This document is how I keep track of what they are and how they should behave.

It is also a portfolio piece. I want anyone who lands here to see how I think about systems: tokens before components, behavior before decoration, accessibility before everything.

Principles

  • Clarity over cleverness. If a component needs a tooltip to be understood, the component is wrong. I rewrite before I document.
  • Tokens before components. Every color, space, radius, and shadow is a named token. Components reference tokens. Screens reference components. I never hard-code a value at the screen level.
  • Predictability is a feature. A button should look and behave the same whether it lives in a marketing page, an onboarding flow, or an admin panel. Surprise is friction.
  • Accessibility is the baseline, not the polish pass. WCAG 2.1 AA is the floor. Focus states, contrast ratios, keyboard paths, and screen reader behavior get specified at the same time as visual design, not after.

Theme Editor

Colors

WCAG Contrast

Primary on Background
AAA Pass (17.85:1)

Excellent contrast.

Sample Text
Secondary on Background
Fail (1.10:1)

Insufficient contrast. Adjust the colors significantly to meet WCAG standards.

Sample Text

Typography

Layout & Effects

Preview

Typography & Hierarchy

This is a preview of the base typography scale. The font family is currently set to system-ui, sans-serif. Notice how the reading experience changes as you adjust the base font size and typeface.

Interactive Elements

Forms & Inputs

Cards & Surfaces

Project Alpha

Active

A showcase of how surface treatments, borders, and rounded corners compound to create a distinct visual identity.

+

Create New Asset

Start from a blank canvas

Layout Templates

Theme Editor

The playground opens on a live theme editor. That was deliberate. Most design systems publish a static spec and assume the consumer will respect it. I wanted to expose the underlying parameters and let anyone feel what happens when they move them.

The editor controls eight dimensions:

  • Primary color (default #0F172A)
  • Secondary base (default #F1F5F9)
  • Font family (default System Sans)
  • Base size (default 16px)
  • Border radius (default 6px)
  • Spacing multiplier (default 1x)
  • Shadow intensity (default 1x)
  • Motion speed (default 0.2s)

Every component in the preview pane re-renders against the current values. The device toggle (Mobile, Tablet, Desktop) sits at the top so you can see how the same tokens behave at different breakpoints.

This is the most important part of the system to understand. The components are not fixed visual artifacts. They are functions of the tokens. If you change a token, every component that references it changes.

Components

The system is organized into seven categories. Each maps to a section in the playground sidebar.

1. Buttons & Actions

Interactive triggers and commands for users to take action.

  • Standard buttons: Default, Secondary, Outline, Ghost, Link, Destructive, Disabled. Default is the filled primary. Secondary is a neutral fill. Outline carries the same weight as default but lighter visually. Ghost has no background until hover. Link reads as inline text. Destructive uses the semantic danger color.
  • Icon and floating action buttons: Icon-only buttons for compact toolbars, "with icon" variants that pair an icon with a label, and a circular floating action button for primary actions on mobile.
  • Button groups and toggles: Segmented controls for mutually exclusive selections (Left, Middle, Right) and view-mode toggles (Map, List, Grid). The italic toggle is the single-button variant.

Loading buttons keep their width to prevent layout shift. Disabled buttons get aria-disabled rather than the disabled attribute when they need to remain focusable for screen reader discovery.

2. Inputs & Forms

Data entry, selection controls, and form patterns.

  • Text inputs: Standard, Password (with reveal toggle), Search (with leading icon), Number (with stepper), Text area.
  • Selection controls: Checkboxes, Radio groups, Switches/Toggles. Switches are for immediate-effect state changes. Checkboxes are for multi-select that requires a submit. Radio groups are for mutually exclusive selections inside a form.
  • Advanced inputs: Select/Dropdown, Combobox/Autocomplete, Slider/Range slider, Date picker, OTP/Pin input, File uploader (drag and drop), Color picker, Tags/Chips/Pill inputs, Rich text editor.

Rule for select vs. combobox: short fixed list, use select. Anything over seven items or anything filterable, use combobox. I never rely on color alone to communicate error state. Errors get an icon, a message, and a border color change together.

3. Navigation

Wayfinding components. Top bars, side navigation, breadcrumbs, tabs (horizontal and vertical), pagination, menu primitives, and the command palette.

Two rules I do not break: the active state is unambiguous, and every navigation element is keyboard-reachable in a sensible tab order.

4. Data Display

Cards, lists, data tables, avatars, badges, tags, dividers, tooltips.

Cards have four variants: default, interactive (whole card is clickable), bordered, elevated. When a card is interactive, the entire surface is the hit target. I do not nest interactive elements inside interactive cards. Data tables use the radius-none token. Tables read better with sharp corners.

5. Feedback & Overlays

Modals, toasts, alerts, and state indicators.

  • Overlays and dialogs: Modal (Open Modal), Destructive confirmation (Delete Item), Drawer/Sheet (Open Drawer/Sheet). All trap focus, close on escape, and return focus to the trigger element on close.
  • Contextual feedback: Inline info icons, mentions (@user pattern), Popovers, Toasts/Snackbars. Toasts auto-dismiss after 5 seconds for success, 8 seconds for warnings. Errors do not auto-dismiss.
  • Alerts and status: Info banners ("Heads up!") and error banners. Banners persist until dismissed or resolved. I use them for system status, account-level alerts, and anything the user needs to act on.
  • Loading and progress: Progress bars for tasks over 3 seconds. Skeletons for content the user is waiting to read. Spinners for actions the user just took.

6. Charts & Metrics

KPI/stat tiles, bar charts, line charts, area charts, donut charts.

Stat tiles follow a strict three-element structure: label, value, delta-versus-prior-period. The delta uses semantic color (green for positive, red for negative) and includes the comparison window in the helper text. Charts use a sequential token palette by default. For diverging or categorical data, I use the dedicated chart color tokens, not the brand palette. Brand colors are for action and emphasis, not data.

7. Complex Patterns

Commonly used combinations of components.

  • Authentication forms: Login and signup composed from input, button, and link primitives. I keep them in a single column, with the submit button as the last tab stop and "Forgot password?" as a link above it.
  • Payment method: Card / PayPal / Apple selector built from segmented buttons, with conditional form rendering below based on the selection.
  • Chat and comments: Threaded message view with avatar, message bubble, timestamp, read receipt, and composer. The composer follows the AI prompt input rules: submit on enter, newline on shift-enter.

8. Templates

Full-page and structural layouts built from system primitives.

  • Dashboard: Standard sidebar + header layout with content area.
  • Landing Page: Hero section, feature grids, and call-to-action blocks.
  • Settings: Two-column layout with vertical navigation and form sections.

Buttons & Actions

Interactive triggers and commands for users to take action.

Standard Buttons

Icon & Floating Action Buttons

Button Groups & Toggles

AI Patterns

Half my work depends on AI patterns, and most design systems do not have a dedicated section for them yet.

Confidence Indicator

High confidence recommendation
Medium confidence. Showing alternatives.
Low confidence. Please verify this information.

Source Citation

The model generates text and cites its sources inline. For example, Base44 is an AI platform[1]that makes building apps faster.

Streaming Output

Generating response...

Human-in-the-loop Handoff

AI Assistant

I don't have access to your billing details to process a refund. Let me transfer you to a human agent.

Transferring to support team... (est. 2 min)

Prompt Input

Enter to newline

Inputs & Forms

Data entry, selection controls, and form patterns.

Text Inputs

Selection Controls

Advanced Inputs

Click or drag file to upload
Design
Development

Please enter a valid email address.

Helper text describes what to do.

Data Display

Components for displaying data, content, and information.

Cards, Tiles & Layouts

Create project
Deploy your new project in one-click.
Content Area

Tables & Lists

A list of your recent invoices.
InvoiceStatusMethodAmount
INV001
Paid
Credit Card$250.00
INV002
Pending
PayPal$150.00

Indicators, Avatars & Badges

AB+3
New
In Progress
Error
Draft

Feedback & Overlays

Modals, toasts, alerts and state indicators.

Overlays & Dialogs

Contextual Feedback

Alerts & Status

Loading & Progress

Charts & Metrics

Data visualization components using Recharts.

KPI / Stat Tiles

Total Revenue
$45,231.89

+20.1% from last month

Subscriptions
+2350

+180.1% from last month

Active Now
+573

+201 since last hour

Bar & Line Charts

JanFebMarAprMayJun01500300045006000
JanFebMarAprMayJun01500300045006000

Area & Donut Charts

JanFebMarAprMayJun01500300045006000

Complex Patterns

Commonly used combinations of components.

Authentication Forms

Login
Enter your email below to login to your account.
Payment Method
Add a new payment method to your account.

Chat & Comments

JD
Hey! I just reviewed the latest design system updates. The new components look fantastic.
10:42 AM
ME
Thanks John! I've also added the complex patterns you requested. Let me know if you need any adjustments.
10:45 AM

Templates

Full-page and structural layouts built from system primitives.

Dashboard Layout

AppName
Overview
Analytics
Settings
JDJohn Doe
Overview
Total Users
10,482
Active Now
342
Revenue
$12,400
Chart Area

Settings Layout

Settings

Profile
Account
Appearance
Notifications

Profile

This is how others will see you on the site.

This is your public display name.

Pricing Table Layout

Simple, transparent pricing

Choose the plan that's right for you

Basic
For individuals getting started
$9/mo
  • Up to 5 projects
  • Basic analytics
  • 24-hour support response
Pro
For growing teams
Popular
$29/mo
  • Unlimited projects
  • Advanced analytics
  • 1-hour support response