# wangshai123/vanilla-jui architecture

> Architecture diagram of the GitHub repository wangshai123/vanilla-jui, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-09). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/wangshai123/vanilla-jui
- Repository: https://github.com/wangshai123/vanilla-jui

## Overview

Vanilla-JUI is a framework-agnostic browser UI library. A page author uses its API to create interactive components and primitives, which render and respond to DOM events; the library also provides reactive, motion, theme, and utility infrastructure. The README documents fine-grained reactivity, composable components, customizable styling, and multi-dimensional themes. Source evidence is partial: the graph shows relationships supported by excerpts or the SOURCE INDEX and omits uncertain wiring, including exact exports for unsampled modules.

Main entry points: [`src/index.ts`](https://github.com/wangshai123/vanilla-jui/blob/main/src/index.ts) (Library Entry), [`src/components/accordion.ts`](https://github.com/wangshai123/vanilla-jui/blob/main/src/components/accordion.ts) (Accordion), [`src/components/form.ts`](https://github.com/wangshai123/vanilla-jui/blob/main/src/components/form.ts) (Form), [`src/components/modal.ts`](https://github.com/wangshai123/vanilla-jui/blob/main/src/components/modal.ts) (Modal)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Library API"]
  node_api["Library Entry<br/>[index.ts]"]
end

subgraph group_components["UI Components"]
  node_accordion["Accordion<br/>[accordion.ts]"]
  node_flow["Flow<br/>[flow.ts]"]
  node_form["Form<br/>[form.ts]"]
  node_menu["Menu<br/>[menu.ts]"]
  node_modal["Modal<br/>[modal.ts]"]
  node_offcanvas["Offcanvas<br/>[offcanvas.ts]"]
  node_pagination["Pagination<br/>[pagination.ts]"]
  node_swiper["Swiper<br/>[swiper.ts]"]
  node_tabs["Tabs<br/>[tabs.ts]"]
  node_toc["Table Of Contents<br/>[toc.ts]"]
end

subgraph group_primitives["UI Primitives"]
  node_drop["Drop<br/>[drop.ts]"]
  node_loading["Loading<br/>[loading.ts]"]
  node_icons["Icons<br/>[icons.ts]"]
  node_toast["Toast<br/>[toast.ts]"]
  node_tooltip["Tooltip<br/>[tooltip.ts]"]
  node_theme["Theme<br/>[theme.ts]"]
  node_sticky["Sticky<br/>[sticky.ts]"]
  node_parabola["Parabola<br/>[parabola.ts]"]
  node_popup["Popup<br/>[popup.ts]"]
end

subgraph group_runtime["Reactive Runtime"]
  node_motion["Motion<br/>[motion.ts]"]
  node_presence["Presence<br/>[presence.ts]"]
  node_scheduler["Scheduler<br/>[scheduler.ts]"]
  node_component["Component Base<br/>[Component.ts]"]
  node_view["View<br/>[view.ts]"]
end

subgraph group_utilities["Shared Utilities"]
  node_dom["DOM Helpers<br/>[dom.ts]"]
  node_config["Config Resolution<br/>[config.ts]"]
  node_events["Event Helpers<br/>[events.ts]"]
  node_ids["ID Generation<br/>[id.ts]"]
  node_locale["Localization<br/>[locale.ts]"]
  node_merge["Config Merging<br/>[merge.ts]"]
  node_objects["Object Checks<br/>[object.ts]"]
  node_validator["Validator<br/>[validator.ts]"]
end

node_page(("Web Page Author"))

node_page -->|"uses"| node_api
node_api -.-> node_accordion
node_api -.-> node_flow
node_api -.-> node_form
node_api -.-> node_menu
node_api -->|"creates"| node_modal
node_api -.-> node_offcanvas
node_api -.-> node_pagination
node_api -.-> node_swiper
node_api -.-> node_tabs
node_api -.-> node_toc
node_api -.-> node_drop
node_api -.-> node_toast
node_api -.-> node_theme
node_api -.-> node_component
node_component -->|"uses"| node_view
node_presence -->|"uses"| node_motion
node_accordion -->|"creates"| node_loading
node_accordion -->|"uses"| node_icons
node_accordion -->|"uses"| node_motion
node_accordion -->|"uses"| node_dom
node_accordion -->|"resolves"| node_config
node_form -->|"resolves"| node_dom
node_form -->|"resolves"| node_config
node_form -->|"delegates"| node_validator
node_modal -->|"uses"| node_popup
node_modal -->|"uses"| node_presence
node_modal -->|"uses"| node_motion
node_offcanvas -->|"uses"| node_presence
node_offcanvas -->|"uses"| node_events
node_swiper -->|"uses"| node_scheduler
node_swiper -->|"uses"| node_events
node_tabs -->|"uses"| node_scheduler
node_tabs -->|"uses"| node_events
node_tooltip -->|"uses"| node_drop
node_toast -->|"creates"| node_loading
node_toast -->|"uses"| node_icons
node_toast -->|"translates"| node_locale
node_loading -->|"renders"| node_icons
node_config -->|"merges"| node_merge
node_config -->|"checks"| node_objects
node_dom -.-> node_objects
node_validator -->|"resolves"| node_dom

click node_api "https://github.com/wangshai123/vanilla-jui/blob/main/src/index.ts"
click node_accordion "https://github.com/wangshai123/vanilla-jui/blob/main/src/components/accordion.ts"
click node_flow "https://github.com/wangshai123/vanilla-jui/blob/main/src/components/flow.ts"
click node_form "https://github.com/wangshai123/vanilla-jui/blob/main/src/components/form.ts"
click node_menu "https://github.com/wangshai123/vanilla-jui/blob/main/src/components/menu.ts"
click node_modal "https://github.com/wangshai123/vanilla-jui/blob/main/src/components/modal.ts"
click node_offcanvas "https://github.com/wangshai123/vanilla-jui/blob/main/src/components/offcanvas.ts"
click node_pagination "https://github.com/wangshai123/vanilla-jui/blob/main/src/components/pagination.ts"
click node_swiper "https://github.com/wangshai123/vanilla-jui/blob/main/src/components/swiper.ts"
click node_tabs "https://github.com/wangshai123/vanilla-jui/blob/main/src/components/tabs.ts"
click node_toc "https://github.com/wangshai123/vanilla-jui/blob/main/src/components/toc.ts"
click node_drop "https://github.com/wangshai123/vanilla-jui/blob/main/src/primitives/drop.ts"
click node_loading "https://github.com/wangshai123/vanilla-jui/blob/main/src/primitives/loading.ts"
click node_icons "https://github.com/wangshai123/vanilla-jui/blob/main/src/primitives/icons.ts"
click node_toast "https://github.com/wangshai123/vanilla-jui/blob/main/src/primitives/toast.ts"
click node_tooltip "https://github.com/wangshai123/vanilla-jui/blob/main/src/primitives/tooltip.ts"
click node_theme "https://github.com/wangshai123/vanilla-jui/blob/main/src/primitives/theme.ts"
click node_sticky "https://github.com/wangshai123/vanilla-jui/blob/main/src/primitives/sticky.ts"
click node_parabola "https://github.com/wangshai123/vanilla-jui/blob/main/src/primitives/parabola.ts"
click node_popup "https://github.com/wangshai123/vanilla-jui/blob/main/src/primitives/popup.ts"
click node_motion "https://github.com/wangshai123/vanilla-jui/blob/main/src/core/motion.ts"
click node_presence "https://github.com/wangshai123/vanilla-jui/blob/main/src/core/presence.ts"
click node_scheduler "https://github.com/wangshai123/vanilla-jui/blob/main/src/core/scheduler.ts"
click node_component "https://github.com/wangshai123/vanilla-jui/blob/main/src/core/Component.ts"
click node_view "https://github.com/wangshai123/vanilla-jui/blob/main/src/core/view.ts"
click node_dom "https://github.com/wangshai123/vanilla-jui/blob/main/src/utilities/dom.ts"
click node_config "https://github.com/wangshai123/vanilla-jui/blob/main/src/utilities/config.ts"
click node_events "https://github.com/wangshai123/vanilla-jui/blob/main/src/utilities/events.ts"
click node_ids "https://github.com/wangshai123/vanilla-jui/blob/main/src/utilities/id.ts"
click node_locale "https://github.com/wangshai123/vanilla-jui/blob/main/src/utilities/locale.ts"
click node_merge "https://github.com/wangshai123/vanilla-jui/blob/main/src/utilities/merge.ts"
click node_objects "https://github.com/wangshai123/vanilla-jui/blob/main/src/utilities/object.ts"
click node_validator "https://github.com/wangshai123/vanilla-jui/blob/main/src/utilities/validator.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_api toneBlue
class node_accordion,node_flow,node_form,node_menu,node_modal,node_offcanvas,node_pagination,node_swiper,node_tabs,node_toc toneAmber
class node_drop,node_loading,node_icons,node_toast,node_tooltip,node_theme,node_sticky,node_parabola,node_popup toneMint
class node_motion,node_presence,node_scheduler,node_component,node_view toneRose
class node_dom,node_config,node_events,node_ids,node_locale,node_merge,node_objects,node_validator,node_page toneIndigo
```

## Components

### Library API

- [Library Entry](https://github.com/wangshai123/vanilla-jui/blob/main/src/index.ts): `src/index.ts`

### UI Components

- [Accordion](https://github.com/wangshai123/vanilla-jui/blob/main/src/components/accordion.ts): `src/components/accordion.ts`
- [Flow](https://github.com/wangshai123/vanilla-jui/blob/main/src/components/flow.ts): `src/components/flow.ts`
- [Form](https://github.com/wangshai123/vanilla-jui/blob/main/src/components/form.ts): `src/components/form.ts`
- [Menu](https://github.com/wangshai123/vanilla-jui/blob/main/src/components/menu.ts): `src/components/menu.ts`
- [Modal](https://github.com/wangshai123/vanilla-jui/blob/main/src/components/modal.ts): `src/components/modal.ts`
- [Offcanvas](https://github.com/wangshai123/vanilla-jui/blob/main/src/components/offcanvas.ts): `src/components/offcanvas.ts`
- [Pagination](https://github.com/wangshai123/vanilla-jui/blob/main/src/components/pagination.ts): `src/components/pagination.ts`
- [Swiper](https://github.com/wangshai123/vanilla-jui/blob/main/src/components/swiper.ts): `src/components/swiper.ts`
- [Tabs](https://github.com/wangshai123/vanilla-jui/blob/main/src/components/tabs.ts): `src/components/tabs.ts`
- [Table Of Contents](https://github.com/wangshai123/vanilla-jui/blob/main/src/components/toc.ts): `src/components/toc.ts`

### UI Primitives

- [Drop](https://github.com/wangshai123/vanilla-jui/blob/main/src/primitives/drop.ts): `src/primitives/drop.ts`
- [Loading](https://github.com/wangshai123/vanilla-jui/blob/main/src/primitives/loading.ts): `src/primitives/loading.ts`
- [Icons](https://github.com/wangshai123/vanilla-jui/blob/main/src/primitives/icons.ts): `src/primitives/icons.ts`
- [Toast](https://github.com/wangshai123/vanilla-jui/blob/main/src/primitives/toast.ts): `src/primitives/toast.ts`
- [Tooltip](https://github.com/wangshai123/vanilla-jui/blob/main/src/primitives/tooltip.ts): `src/primitives/tooltip.ts`
- [Theme](https://github.com/wangshai123/vanilla-jui/blob/main/src/primitives/theme.ts): `src/primitives/theme.ts`
- [Sticky](https://github.com/wangshai123/vanilla-jui/blob/main/src/primitives/sticky.ts): `src/primitives/sticky.ts`
- [Parabola](https://github.com/wangshai123/vanilla-jui/blob/main/src/primitives/parabola.ts): `src/primitives/parabola.ts`
- [Popup](https://github.com/wangshai123/vanilla-jui/blob/main/src/primitives/popup.ts): `src/primitives/popup.ts`

### Reactive Runtime

- [Motion](https://github.com/wangshai123/vanilla-jui/blob/main/src/core/motion.ts): `src/core/motion.ts`
- [Presence](https://github.com/wangshai123/vanilla-jui/blob/main/src/core/presence.ts): `src/core/presence.ts`
- [Scheduler](https://github.com/wangshai123/vanilla-jui/blob/main/src/core/scheduler.ts): `src/core/scheduler.ts`
- [Component Base](https://github.com/wangshai123/vanilla-jui/blob/main/src/core/Component.ts): `src/core/Component.ts`
- [View](https://github.com/wangshai123/vanilla-jui/blob/main/src/core/view.ts): `src/core/view.ts`

### Shared Utilities

- [DOM Helpers](https://github.com/wangshai123/vanilla-jui/blob/main/src/utilities/dom.ts): `src/utilities/dom.ts`
- [Config Resolution](https://github.com/wangshai123/vanilla-jui/blob/main/src/utilities/config.ts): `src/utilities/config.ts`
- [Event Helpers](https://github.com/wangshai123/vanilla-jui/blob/main/src/utilities/events.ts): `src/utilities/events.ts`
- [ID Generation](https://github.com/wangshai123/vanilla-jui/blob/main/src/utilities/id.ts): `src/utilities/id.ts`
- [Localization](https://github.com/wangshai123/vanilla-jui/blob/main/src/utilities/locale.ts): `src/utilities/locale.ts`
- [Config Merging](https://github.com/wangshai123/vanilla-jui/blob/main/src/utilities/merge.ts): `src/utilities/merge.ts`
- [Object Checks](https://github.com/wangshai123/vanilla-jui/blob/main/src/utilities/object.ts): `src/utilities/object.ts`
- [Validator](https://github.com/wangshai123/vanilla-jui/blob/main/src/utilities/validator.ts): `src/utilities/validator.ts`

### Other components

- **Web Page Author**

## Connections

- Web Page Author → Library Entry: uses (evidence: `README.md`)
- Library Entry → Accordion (evidence: `src/index.ts`)
- Library Entry → Flow (evidence: `src/index.ts`)
- Library Entry → Form (evidence: `src/index.ts`)
- Library Entry → Menu (evidence: `src/index.ts`)
- Library Entry → Modal: creates (evidence: `README.md`)
- Library Entry → Offcanvas (evidence: `src/index.ts`)
- Library Entry → Pagination (evidence: `src/index.ts`)
- Library Entry → Swiper (evidence: `src/index.ts`)
- Library Entry → Tabs (evidence: `src/index.ts`)
- Library Entry → Table Of Contents (evidence: `src/index.ts`)
- Library Entry → Drop (evidence: `src/index.ts`)
- Library Entry → Toast (evidence: `src/index.ts`)
- Library Entry → Theme (evidence: `src/index.ts`)
- Library Entry → Component Base
- Component Base → View: uses (evidence: `src/core/Component.ts`)
- Presence → Motion: uses (evidence: `src/core/presence.ts`)
- Accordion → Loading: creates (evidence: `src/components/accordion.ts`)
- Accordion → Icons: uses (evidence: `src/components/accordion.ts`)
- Accordion → Motion: uses (evidence: `src/components/accordion.ts`)
- Accordion → DOM Helpers: uses (evidence: `src/components/accordion.ts`)
- Accordion → Config Resolution: resolves (evidence: `src/components/accordion.ts`)
- Form → DOM Helpers: resolves (evidence: `src/components/form.ts`)
- Form → Config Resolution: resolves (evidence: `src/components/form.ts`)
- Form → Validator: delegates (evidence: `src/components/form.ts`)
- Modal → Popup: uses (evidence: `src/components/modal.ts`)
- Modal → Presence: uses (evidence: `src/components/modal.ts`)
- Modal → Motion: uses (evidence: `src/components/modal.ts`)
- Offcanvas → Presence: uses (evidence: `src/components/offcanvas.ts`)
- Offcanvas → Event Helpers: uses (evidence: `src/components/offcanvas.ts`)
- Swiper → Scheduler: uses (evidence: `src/components/swiper.ts`)
- Swiper → Event Helpers: uses (evidence: `src/components/swiper.ts`)
- Tabs → Scheduler: uses (evidence: `src/components/tabs.ts`)
- Tabs → Event Helpers: uses (evidence: `src/components/tabs.ts`)
- Tooltip → Drop: uses (evidence: `src/primitives/tooltip.ts`)
- Toast → Loading: creates (evidence: `src/primitives/toast.ts`)
- Toast → Icons: uses (evidence: `src/primitives/toast.ts`)
- Toast → Localization: translates (evidence: `src/primitives/toast.ts`)
- Loading → Icons: renders (evidence: `src/primitives/loading.ts`)
- Config Resolution → Config Merging: merges (evidence: `src/utilities/config.ts`)
- Config Resolution → Object Checks: checks (evidence: `src/utilities/config.ts`)
- DOM Helpers → Object Checks
- Validator → DOM Helpers: resolves (evidence: `src/utilities/validator.ts`)
