Skip to content
Design & CreativityLocal · Stays on device

UI Component Generator

Generate HTML and CSS for buttons, inputs, cards, badges and alerts with variants and states, check contrast, focus and target size, and export code or a spec.

  • HTML page, CSS, HTML snippet, React (TSX)
  • Free to use
  • No sign-up or watermark
ui-component-generatorOn this device
HTML pageCSSHTML snippet
Open UI Component Generator

About this tool

Choose a component (button, text input, card, badge or alert), its variants (for buttons: primary, secondary, outline, ghost, danger) and sizes, then set colours, font, padding, radius, border and focus ring. The tool writes clean, class-based CSS with hover, focus-visible, active and disabled states, plus matching HTML.

Plan mode builds a component spec (purpose, usage, anatomy, states, properties, tokens, keyboard behaviour). Check mode tests the label contrast of every variant and state, input and outline borders, the focus indicator (contrast and thickness) and the target size of each size against WCAG 2.2 (1.4.3, 1.4.11, 2.4.7, 2.5.8). The states preview shows every variant in every state side by side in an isolated frame with no scripts. Export as a full HTML page, CSS, an HTML snippet, a typed React component, tokens JSON or the Markdown spec.

  1. Input

    Your details

    HTML page, CSS, HTML snippet, React (TSX), Tokens JSON

  2. Processing

    Processed in this browser

    Instant, in-browser. Nothing is uploaded.

  3. Output

    Your result

    Shown instantly, ready to copy or export

Local processing pipelineCustom colour maths (WCAG 2.x) + Sandboxed iframe preview (no scripts)

How to use it

  1. 1

    Pick a component and adjust its settings and colours.

  2. 2

    Open Check and fix any failing contrast, focus or size results; use States preview to see every state.

  3. 3

    Export the code or the spec, and save the editable JSON.

Zero-upload architecture

How to use UI Component Generator for free, with no upload

Free, with no sign-up or watermark · Your details stay on your device

  1. 1

    Open UI Component Generator

    Launch the app. There is nothing to install and no account to create.

  2. 2

    Work through it

    Open Check and fix any failing contrast, focus or size results; use States preview to see every state.

  3. 3

    Get your result

    Export the code or the spec, and save the editable JSON.

  • Local

    Design System Generator

    Generate design tokens — colour scales, semantic light and dark colours, type scale, spacing, radii and shadows — then plan, check, preview and export them.

    Open tool
  • Local

    Color Contrast Checker

    Check text and background colours against WCAG 2.2 AA and AAA, and get the nearest passing colour.

    Open tool
  • Local

    CSS Gradient Generator

    Design linear, radial and conic CSS gradients with draggable colour stops and copy the code.

    Open tool
  • Local

    Landing Page Wireframe Generator

    Build a landing-page wireframe from sections, plan the content, check hierarchy and calls to action, preview it at desktop, tablet and phone widths and export HTML, SVG, PNG or JSON.

    Open tool