# rough-stuff/wired-elements architecture

> Architecture diagram of the GitHub repository rough-stuff/wired-elements, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-04). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/rough-stuff/wired-elements
- Repository: https://github.com/rough-stuff/wired-elements

## Overview

Wired Elements is a browser UI-component library for composing hand-drawn web components in HTML or JavaScript. The user imports or loads the components, places their custom elements in a page, and receives interactive controls and visual elements. The component set spans inputs and selection, layout and dialogs, progress and media, plus experimental icon components. Internally, the main components share a Lit-based rendering base and rough-SVG drawing helpers. Edges are limited to relationships visible in the README or SOURCE INDEX; unsampled component internals are not inferred.

Main entry points: [`src/wired-base.ts`](https://github.com/rough-stuff/wired-elements/blob/master/src/wired-base.ts) (Component base), [`src/wired-lib.ts`](https://github.com/rough-stuff/wired-elements/blob/master/src/wired-lib.ts) (Rough SVG helpers), [`src/wired-video.ts`](https://github.com/rough-stuff/wired-elements/blob/master/src/wired-video.ts) (Video player), [`src/wired-combo.ts`](https://github.com/rough-stuff/wired-elements/blob/master/src/wired-combo.ts) (Combo box)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Library entry"]
  node_elements["Element exports<br/>[wired-elements.ts]"]
  node_base["Component base<br/>[wired-base.ts]"]
  node_drawing["Rough SVG helpers<br/>[wired-lib.ts]"]
end

subgraph group_controls["Inputs and selection"]
  node_button["Button<br/>[wired-button.ts]"]
  node_input["Text input<br/>[wired-input.ts]"]
  node_textarea["Text area<br/>[wired-textarea.ts]"]
  node_search["Search input"]
  node_checkbox["Checkbox<br/>[wired-checkbox.ts]"]
  node_radio["Radio controls<br/>[wired-radio.ts]"]
  node_listbox["List box<br/>[wired-listbox.ts]"]
  node_combo["Combo box<br/>[wired-combo.ts]"]
  node_calendar["Calendar<br/>[wired-calendar.ts]"]
end

subgraph group_visuals["Layout and indicators"]
  node_card["Card<br/>[wired-card.ts]"]
  node_dialog["Dialog<br/>[wired-dialog.ts]"]
  node_tabs["Tabs<br/>[wired-tabs.ts]"]
  node_progress["Progress<br/>[wired-progress.ts]"]
  node_slider["Slider<br/>[wired-slider.ts]"]
  node_item["List item<br/>[wired-item.ts]"]
end

subgraph group_media["Media components"]
  node_video["Video player<br/>[wired-video.ts]"]
end

subgraph group_icons["Experimental icons"]
  node_icon["Wired icon<br/>[WiredIcon.ts]"]
  node_iconset["Icon path set<br/>[iconset-full.ts]"]
  node_iconlookup["Icon lookup<br/>[index.ts]"]
  node_maticon["Material icon<br/>[WiredMatIcon.ts]"]
end

node_user(("Application author"))

node_user -->|"imports components"| node_elements
node_elements -.->|"exports"| node_button
node_button -->|"extends"| node_base
node_button -->|"uses drawing"| node_drawing
node_input -->|"extends"| node_base
node_input -->|"uses drawing"| node_drawing
node_textarea -->|"extends"| node_base
node_textarea -->|"uses drawing"| node_drawing
node_search -->|"extends"| node_base
node_search -->|"uses drawing"| node_drawing
node_checkbox -->|"extends"| node_base
node_radio -->|"extends"| node_base
node_radio -->|"uses drawing"| node_drawing
node_listbox -->|"extends"| node_base
node_listbox -->|"uses drawing"| node_drawing
node_combo -->|"extends"| node_base
node_combo -->|"uses drawing"| node_drawing
node_combo -->|"uses"| node_card
node_combo -->|"uses"| node_item
node_calendar -->|"extends"| node_base
node_calendar -->|"uses drawing"| node_drawing
node_card -->|"extends"| node_base
node_card -->|"uses drawing"| node_drawing
node_tabs -->|"extends"| node_base
node_progress -->|"extends"| node_base
node_progress -->|"uses drawing"| node_drawing
node_slider -->|"extends"| node_base
node_slider -->|"uses drawing"| node_drawing
node_item -->|"extends"| node_base
node_item -->|"uses drawing"| node_drawing
node_video -->|"extends"| node_base
node_video -->|"uses drawing"| node_drawing
node_video -->|"updates progress"| node_progress
node_video -->|"reads volume"| node_slider
node_video -->|"renders control"| node_button
node_icon -.->|"uses wired-lib"| node_icon
node_maticon -->|"looks up path"| node_iconlookup
node_maticon -->|"loads paths"| node_iconset
node_maticon -->|"renders icon"| node_icon

click node_elements "https://github.com/rough-stuff/wired-elements/blob/master/src/wired-elements.ts"
click node_base "https://github.com/rough-stuff/wired-elements/blob/master/src/wired-base.ts"
click node_drawing "https://github.com/rough-stuff/wired-elements/blob/master/src/wired-lib.ts"
click node_button "https://github.com/rough-stuff/wired-elements/blob/master/src/wired-button.ts"
click node_input "https://github.com/rough-stuff/wired-elements/blob/master/src/wired-input.ts"
click node_textarea "https://github.com/rough-stuff/wired-elements/blob/master/src/wired-textarea.ts"
click node_search "https://github.com/rough-stuff/wired-elements/blob/master/src/wired-search-input.ts"
click node_checkbox "https://github.com/rough-stuff/wired-elements/blob/master/src/wired-checkbox.ts"
click node_radio "https://github.com/rough-stuff/wired-elements/blob/master/src/wired-radio.ts"
click node_listbox "https://github.com/rough-stuff/wired-elements/blob/master/src/wired-listbox.ts"
click node_combo "https://github.com/rough-stuff/wired-elements/blob/master/src/wired-combo.ts"
click node_calendar "https://github.com/rough-stuff/wired-elements/blob/master/src/wired-calendar.ts"
click node_card "https://github.com/rough-stuff/wired-elements/blob/master/src/wired-card.ts"
click node_dialog "https://github.com/rough-stuff/wired-elements/blob/master/src/wired-dialog.ts"
click node_tabs "https://github.com/rough-stuff/wired-elements/blob/master/src/wired-tabs.ts"
click node_progress "https://github.com/rough-stuff/wired-elements/blob/master/src/wired-progress.ts"
click node_slider "https://github.com/rough-stuff/wired-elements/blob/master/src/wired-slider.ts"
click node_item "https://github.com/rough-stuff/wired-elements/blob/master/src/wired-item.ts"
click node_video "https://github.com/rough-stuff/wired-elements/blob/master/src/wired-video.ts"
click node_icon "https://github.com/rough-stuff/wired-elements/blob/master/experimental/wired-icon/src/WiredIcon.ts"
click node_iconset "https://github.com/rough-stuff/wired-elements/blob/master/experimental/wired-mat-icon/src/iconset/iconset-full.ts"
click node_iconlookup "https://github.com/rough-stuff/wired-elements/blob/master/experimental/wired-mat-icon/src/iconset/index.ts"
click node_maticon "https://github.com/rough-stuff/wired-elements/blob/master/experimental/wired-mat-icon/src/WiredMatIcon.ts"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_elements,node_base,node_drawing toneBlue
class node_button,node_input,node_textarea,node_search,node_checkbox,node_radio,node_listbox,node_combo,node_calendar toneAmber
class node_card,node_dialog,node_tabs,node_progress,node_slider,node_item toneMint
class node_video toneRose
class node_icon,node_iconset,node_iconlookup,node_maticon,node_user toneIndigo
```

## Components

### Library entry

- [Element exports](https://github.com/rough-stuff/wired-elements/blob/master/src/wired-elements.ts): `src/wired-elements.ts`
- [Component base](https://github.com/rough-stuff/wired-elements/blob/master/src/wired-base.ts): `src/wired-base.ts`
- [Rough SVG helpers](https://github.com/rough-stuff/wired-elements/blob/master/src/wired-lib.ts): `src/wired-lib.ts`

### Inputs and selection

- [Button](https://github.com/rough-stuff/wired-elements/blob/master/src/wired-button.ts): `src/wired-button.ts`
- [Text input](https://github.com/rough-stuff/wired-elements/blob/master/src/wired-input.ts): `src/wired-input.ts`
- [Text area](https://github.com/rough-stuff/wired-elements/blob/master/src/wired-textarea.ts): `src/wired-textarea.ts`
- [Search input](https://github.com/rough-stuff/wired-elements/blob/master/src/wired-search-input.ts): `src/wired-search-input.ts`
- [Checkbox](https://github.com/rough-stuff/wired-elements/blob/master/src/wired-checkbox.ts): `src/wired-checkbox.ts`
- [Radio controls](https://github.com/rough-stuff/wired-elements/blob/master/src/wired-radio.ts): `src/wired-radio.ts`
- [List box](https://github.com/rough-stuff/wired-elements/blob/master/src/wired-listbox.ts): `src/wired-listbox.ts`
- [Combo box](https://github.com/rough-stuff/wired-elements/blob/master/src/wired-combo.ts): `src/wired-combo.ts`
- [Calendar](https://github.com/rough-stuff/wired-elements/blob/master/src/wired-calendar.ts): `src/wired-calendar.ts`

### Layout and indicators

- [Card](https://github.com/rough-stuff/wired-elements/blob/master/src/wired-card.ts): `src/wired-card.ts`
- [Dialog](https://github.com/rough-stuff/wired-elements/blob/master/src/wired-dialog.ts): `src/wired-dialog.ts`
- [Tabs](https://github.com/rough-stuff/wired-elements/blob/master/src/wired-tabs.ts): `src/wired-tabs.ts`
- [Progress](https://github.com/rough-stuff/wired-elements/blob/master/src/wired-progress.ts): `src/wired-progress.ts`
- [Slider](https://github.com/rough-stuff/wired-elements/blob/master/src/wired-slider.ts): `src/wired-slider.ts`
- [List item](https://github.com/rough-stuff/wired-elements/blob/master/src/wired-item.ts): `src/wired-item.ts`

### Media components

- [Video player](https://github.com/rough-stuff/wired-elements/blob/master/src/wired-video.ts): `src/wired-video.ts`

### Experimental icons

- [Wired icon](https://github.com/rough-stuff/wired-elements/blob/master/experimental/wired-icon/src/WiredIcon.ts): `experimental/wired-icon/src/WiredIcon.ts`
- [Icon path set](https://github.com/rough-stuff/wired-elements/blob/master/experimental/wired-mat-icon/src/iconset/iconset-full.ts): `experimental/wired-mat-icon/src/iconset/iconset-full.ts`
- [Icon lookup](https://github.com/rough-stuff/wired-elements/blob/master/experimental/wired-mat-icon/src/iconset/index.ts): `experimental/wired-mat-icon/src/iconset/index.ts`
- [Material icon](https://github.com/rough-stuff/wired-elements/blob/master/experimental/wired-mat-icon/src/WiredMatIcon.ts): `experimental/wired-mat-icon/src/WiredMatIcon.ts`

### Other components

- **Application author**

## Connections

- Application author → Element exports: imports components
- Element exports → Button: exports
- Button → Component base: extends (evidence: `src/wired-button.ts`)
- Button → Rough SVG helpers: uses drawing (evidence: `src/wired-button.ts`)
- Text input → Component base: extends (evidence: `src/wired-input.ts`)
- Text input → Rough SVG helpers: uses drawing (evidence: `src/wired-input.ts`)
- Text area → Component base: extends (evidence: `src/wired-textarea.ts`)
- Text area → Rough SVG helpers: uses drawing (evidence: `src/wired-textarea.ts`)
- Search input → Component base: extends (evidence: `src/wired-search-input.ts`)
- Search input → Rough SVG helpers: uses drawing (evidence: `src/wired-search-input.ts`)
- Checkbox → Component base: extends
- Radio controls → Component base: extends (evidence: `src/wired-radio.ts`)
- Radio controls → Rough SVG helpers: uses drawing (evidence: `src/wired-radio.ts`)
- List box → Component base: extends (evidence: `src/wired-listbox.ts`)
- List box → Rough SVG helpers: uses drawing (evidence: `src/wired-listbox.ts`)
- Combo box → Component base: extends (evidence: `src/wired-combo.ts`)
- Combo box → Rough SVG helpers: uses drawing (evidence: `src/wired-combo.ts`)
- Combo box → Card: uses (evidence: `src/wired-combo.ts`)
- Combo box → List item: uses (evidence: `src/wired-combo.ts`)
- Calendar → Component base: extends (evidence: `src/wired-calendar.ts`)
- Calendar → Rough SVG helpers: uses drawing (evidence: `src/wired-calendar.ts`)
- Card → Component base: extends (evidence: `src/wired-card.ts`)
- Card → Rough SVG helpers: uses drawing (evidence: `src/wired-card.ts`)
- Tabs → Component base: extends (evidence: `src/wired-tabs.ts`)
- Progress → Component base: extends (evidence: `src/wired-progress.ts`)
- Progress → Rough SVG helpers: uses drawing (evidence: `src/wired-progress.ts`)
- Slider → Component base: extends (evidence: `src/wired-slider.ts`)
- Slider → Rough SVG helpers: uses drawing (evidence: `src/wired-slider.ts`)
- List item → Component base: extends (evidence: `src/wired-item.ts`)
- List item → Rough SVG helpers: uses drawing (evidence: `src/wired-item.ts`)
- Video player → Component base: extends (evidence: `src/wired-video.ts`)
- Video player → Rough SVG helpers: uses drawing (evidence: `src/wired-video.ts`)
- Video player → Progress: updates progress (evidence: `src/wired-video.ts`)
- Video player → Slider: reads volume (evidence: `src/wired-video.ts`)
- Video player → Button: renders control (evidence: `src/wired-video.ts`)
- Wired icon → Wired icon: uses wired-lib (evidence: `experimental/wired-icon/src/WiredIcon.ts`)
- Material icon → Icon lookup: looks up path (evidence: `experimental/wired-mat-icon/src/WiredMatIcon.ts`)
- Material icon → Icon path set: loads paths (evidence: `experimental/wired-mat-icon/src/WiredMatIcon.ts`)
- Material icon → Wired icon: renders icon (evidence: `experimental/wired-mat-icon/src/WiredMatIcon.ts`)
