# mdbootstrap/mdb-ui-kit architecture

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

- Interactive diagram: https://gitdiagram.com/mdbootstrap/mdb-ui-kit
- Repository: https://github.com/mdbootstrap/mdb-ui-kit

## Overview

MDB is a plain-JavaScript Bootstrap UI kit: developers use its exported components in web pages, and its auto-initializer can find configured components in the DOM and instantiate them. The source tree also contains a prefixed Bootstrap component implementation, MDB-specific controls, DOM utilities, and a custom scrollbar. The README establishes the product capabilities; internal edges below are limited to relationships shown in excerpts or the SOURCE INDEX, so unsampled implementations are grouped by their exact source directories.

Main entry points: [`src/js/autoinit/init.js`](https://github.com/mdbootstrap/mdb-ui-kit/blob/master/src/js/autoinit/init.js) (Auto initialization), [`src/js/bootstrap/mdb-prefix`](https://github.com/mdbootstrap/mdb-ui-kit/tree/master/src/js/bootstrap/mdb-prefix) (Bootstrap UI), [`src/js/mdb/dom`](https://github.com/mdbootstrap/mdb-ui-kit/tree/master/src/js/mdb/dom) (MDB DOM utilities), [`src/js/free/ripple.js`](https://github.com/mdbootstrap/mdb-ui-kit/blob/master/src/js/free/ripple.js) (Ripple effect)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Entry and initialization"]
  node_mdb_entry["MDB exports<br/>[mdb.free.umd.js]"]
  node_auto_init["Auto initialization<br/>[init.js]"]
  node_auto_selectors["Init selectors<br/>[free.js]"]
  node_auto_callbacks["Init callbacks<br/>[free.js]"]
end

subgraph group_bootstrap["Bootstrap components"]
  node_bs_components["Bootstrap UI"]
  node_bs_base["Base component<br/>[base-component.js]"]
  node_bs_events["Bootstrap events<br/>[event-handler.js]"]
  node_bs_selectors["Bootstrap selectors<br/>[selector-engine.js]"]
  node_bs_config["Bootstrap utilities<br/>[config.js]"]
  node_bs_sanitizer["HTML sanitizer<br/>[sanitizer.js]"]
end

subgraph group_mdb["MDB components"]
  node_mdb_controls["MDB controls"]
  node_mdb_base["MDB base component<br/>[base-component.js]"]
  node_mdb_button["Button behavior<br/>[button.js]"]
  node_mdb_input["Input behavior<br/>[input.js]"]
  node_mdb_ripple["Ripple effect<br/>[ripple.js]"]
end

subgraph group_runtime["Shared runtime"]
  node_mdb_dom["MDB DOM utilities"]
  node_mdb_util["MDB utilities<br/>[index.js]"]
  node_scrollbar["Perfect scrollbar<br/>[index.js]"]
  node_scroll_geometry["Scrollbar geometry<br/>[update-geometry.js]"]
  node_scroll_names["Scrollbar classes<br/>[class-names.js]"]
end

node_developer(("Web developer"))

node_developer -->|"uses UI kit"| node_mdb_entry
node_mdb_entry -->|"exports components"| node_bs_components
node_mdb_entry -->|"exports components"| node_mdb_controls
node_mdb_entry -->|"loads initializer"| node_auto_selectors
node_auto_selectors -->|"configures initialization"| node_auto_init
node_auto_selectors -->|"registers callbacks"| node_auto_callbacks
node_auto_init -->|"selects DOM elements"| node_mdb_dom
node_auto_init -->|"registers plugins"| node_mdb_util
node_auto_callbacks -->|"uses DOM helpers"| node_mdb_dom
node_bs_components -.->|"extends base"| node_bs_base
node_bs_base -->|"uses event handling"| node_bs_events
node_bs_base -->|"uses configuration"| node_bs_config
node_bs_components -.->|"selects elements"| node_bs_selectors
node_bs_components -.->|"sanitizes content"| node_bs_sanitizer
node_mdb_controls -.->|"extends base"| node_mdb_base
node_mdb_button -->|"uses DOM helpers"| node_mdb_dom
node_mdb_button -->|"uses Bootstrap button"| node_bs_components
node_mdb_button -->|"requests initialization"| node_auto_init
node_mdb_input -->|"extends base"| node_mdb_base
node_mdb_input -->|"uses DOM helpers"| node_mdb_dom
node_mdb_input -->|"requests initialization"| node_auto_init
node_mdb_ripple -->|"extends base"| node_mdb_base
node_mdb_ripple -->|"uses DOM helpers"| node_mdb_dom
node_mdb_ripple -->|"creates elements"| node_mdb_util
node_mdb_ripple -->|"requests initialization"| node_auto_init
node_scrollbar -->|"updates geometry"| node_scroll_geometry
node_scrollbar -->|"uses class names"| node_scroll_names
node_scroll_geometry -->|"sets state classes"| node_scroll_names

click node_mdb_entry "https://github.com/mdbootstrap/mdb-ui-kit/blob/master/src/js/mdb.free.umd.js"
click node_auto_init "https://github.com/mdbootstrap/mdb-ui-kit/blob/master/src/js/autoinit/init.js"
click node_auto_selectors "https://github.com/mdbootstrap/mdb-ui-kit/blob/master/src/js/autoinit/initSelectors/free.js"
click node_auto_callbacks "https://github.com/mdbootstrap/mdb-ui-kit/blob/master/src/js/autoinit/callbacks/free.js"
click node_bs_components "https://github.com/mdbootstrap/mdb-ui-kit/tree/master/src/js/bootstrap/mdb-prefix"
click node_bs_base "https://github.com/mdbootstrap/mdb-ui-kit/blob/master/src/js/bootstrap/mdb-prefix/base-component.js"
click node_bs_events "https://github.com/mdbootstrap/mdb-ui-kit/blob/master/src/js/bootstrap/mdb-prefix/dom/event-handler.js"
click node_bs_selectors "https://github.com/mdbootstrap/mdb-ui-kit/blob/master/src/js/bootstrap/mdb-prefix/dom/selector-engine.js"
click node_bs_config "https://github.com/mdbootstrap/mdb-ui-kit/blob/master/src/js/bootstrap/mdb-prefix/util/config.js"
click node_bs_sanitizer "https://github.com/mdbootstrap/mdb-ui-kit/blob/master/src/js/bootstrap/mdb-prefix/util/sanitizer.js"
click node_mdb_controls "https://github.com/mdbootstrap/mdb-ui-kit/tree/master/src/js/free"
click node_mdb_base "https://github.com/mdbootstrap/mdb-ui-kit/blob/master/src/js/free/base-component.js"
click node_mdb_button "https://github.com/mdbootstrap/mdb-ui-kit/blob/master/src/js/free/button.js"
click node_mdb_input "https://github.com/mdbootstrap/mdb-ui-kit/blob/master/src/js/free/input.js"
click node_mdb_ripple "https://github.com/mdbootstrap/mdb-ui-kit/blob/master/src/js/free/ripple.js"
click node_mdb_dom "https://github.com/mdbootstrap/mdb-ui-kit/tree/master/src/js/mdb/dom"
click node_mdb_util "https://github.com/mdbootstrap/mdb-ui-kit/blob/master/src/js/mdb/util/index.js"
click node_scrollbar "https://github.com/mdbootstrap/mdb-ui-kit/blob/master/src/js/mdb/perfect-scrollbar/index.js"
click node_scroll_geometry "https://github.com/mdbootstrap/mdb-ui-kit/blob/master/src/js/mdb/perfect-scrollbar/update-geometry.js"
click node_scroll_names "https://github.com/mdbootstrap/mdb-ui-kit/blob/master/src/js/mdb/perfect-scrollbar/lib/class-names.js"

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_mdb_entry,node_auto_init,node_auto_selectors,node_auto_callbacks toneBlue
class node_bs_components,node_bs_base,node_bs_events,node_bs_selectors,node_bs_config,node_bs_sanitizer toneAmber
class node_mdb_controls,node_mdb_base,node_mdb_button,node_mdb_input,node_mdb_ripple toneMint
class node_mdb_dom,node_mdb_util,node_scrollbar,node_scroll_geometry,node_scroll_names toneRose
class node_developer toneIndigo
```

## Components

### Entry and initialization

- [MDB exports](https://github.com/mdbootstrap/mdb-ui-kit/blob/master/src/js/mdb.free.umd.js): `src/js/mdb.free.umd.js`
- [Auto initialization](https://github.com/mdbootstrap/mdb-ui-kit/blob/master/src/js/autoinit/init.js): `src/js/autoinit/init.js`
- [Init selectors](https://github.com/mdbootstrap/mdb-ui-kit/blob/master/src/js/autoinit/initSelectors/free.js): `src/js/autoinit/initSelectors/free.js`
- [Init callbacks](https://github.com/mdbootstrap/mdb-ui-kit/blob/master/src/js/autoinit/callbacks/free.js): `src/js/autoinit/callbacks/free.js`

### Bootstrap components

- [Bootstrap UI](https://github.com/mdbootstrap/mdb-ui-kit/tree/master/src/js/bootstrap/mdb-prefix): `src/js/bootstrap/mdb-prefix`
- [Base component](https://github.com/mdbootstrap/mdb-ui-kit/blob/master/src/js/bootstrap/mdb-prefix/base-component.js): `src/js/bootstrap/mdb-prefix/base-component.js`
- [Bootstrap events](https://github.com/mdbootstrap/mdb-ui-kit/blob/master/src/js/bootstrap/mdb-prefix/dom/event-handler.js): `src/js/bootstrap/mdb-prefix/dom/event-handler.js`
- [Bootstrap selectors](https://github.com/mdbootstrap/mdb-ui-kit/blob/master/src/js/bootstrap/mdb-prefix/dom/selector-engine.js): `src/js/bootstrap/mdb-prefix/dom/selector-engine.js`
- [Bootstrap utilities](https://github.com/mdbootstrap/mdb-ui-kit/blob/master/src/js/bootstrap/mdb-prefix/util/config.js): `src/js/bootstrap/mdb-prefix/util/config.js`
- [HTML sanitizer](https://github.com/mdbootstrap/mdb-ui-kit/blob/master/src/js/bootstrap/mdb-prefix/util/sanitizer.js): `src/js/bootstrap/mdb-prefix/util/sanitizer.js`

### MDB components

- [MDB controls](https://github.com/mdbootstrap/mdb-ui-kit/tree/master/src/js/free): `src/js/free`
- [MDB base component](https://github.com/mdbootstrap/mdb-ui-kit/blob/master/src/js/free/base-component.js): `src/js/free/base-component.js`
- [Button behavior](https://github.com/mdbootstrap/mdb-ui-kit/blob/master/src/js/free/button.js): `src/js/free/button.js`
- [Input behavior](https://github.com/mdbootstrap/mdb-ui-kit/blob/master/src/js/free/input.js): `src/js/free/input.js`
- [Ripple effect](https://github.com/mdbootstrap/mdb-ui-kit/blob/master/src/js/free/ripple.js): `src/js/free/ripple.js`

### Shared runtime

- [MDB DOM utilities](https://github.com/mdbootstrap/mdb-ui-kit/tree/master/src/js/mdb/dom): `src/js/mdb/dom`
- [MDB utilities](https://github.com/mdbootstrap/mdb-ui-kit/blob/master/src/js/mdb/util/index.js): `src/js/mdb/util/index.js`
- [Perfect scrollbar](https://github.com/mdbootstrap/mdb-ui-kit/blob/master/src/js/mdb/perfect-scrollbar/index.js): `src/js/mdb/perfect-scrollbar/index.js`
- [Scrollbar geometry](https://github.com/mdbootstrap/mdb-ui-kit/blob/master/src/js/mdb/perfect-scrollbar/update-geometry.js): `src/js/mdb/perfect-scrollbar/update-geometry.js`
- [Scrollbar classes](https://github.com/mdbootstrap/mdb-ui-kit/blob/master/src/js/mdb/perfect-scrollbar/lib/class-names.js): `src/js/mdb/perfect-scrollbar/lib/class-names.js`

### Other components

- **Web developer**

## Connections

- Web developer → MDB exports: uses UI kit (evidence: `README.md`)
- MDB exports → Bootstrap UI: exports components (evidence: `src/js/mdb.free.umd.js`)
- MDB exports → MDB controls: exports components (evidence: `src/js/mdb.free.umd.js`)
- MDB exports → Init selectors: loads initializer (evidence: `src/js/mdb.free.umd.js`)
- Init selectors → Auto initialization: configures initialization (evidence: `src/js/autoinit/index.free.js`)
- Init selectors → Init callbacks: registers callbacks (evidence: `src/js/autoinit/initSelectors/free.js`)
- Auto initialization → MDB DOM utilities: selects DOM elements (evidence: `src/js/autoinit/init.js`)
- Auto initialization → MDB utilities: registers plugins (evidence: `src/js/autoinit/init.js`)
- Init callbacks → MDB DOM utilities: uses DOM helpers (evidence: `src/js/autoinit/callbacks/free.js`)
- Bootstrap UI → Base component: extends base (evidence: `src/js/bootstrap/mdb-prefix/tooltip.js`)
- Base component → Bootstrap events: uses event handling (evidence: `src/js/bootstrap/mdb-prefix/base-component.js`)
- Base component → Bootstrap utilities: uses configuration (evidence: `src/js/bootstrap/mdb-prefix/base-component.js`)
- Bootstrap UI → Bootstrap selectors: selects elements (evidence: `src/js/bootstrap/mdb-prefix/dropdown.js`)
- Bootstrap UI → HTML sanitizer: sanitizes content (evidence: `src/js/bootstrap/mdb-prefix/tooltip.js`)
- MDB controls → MDB base component: extends base (evidence: `src/js/free/ripple.js`)
- Button behavior → MDB DOM utilities: uses DOM helpers (evidence: `src/js/free/button.js`)
- Button behavior → Bootstrap UI: uses Bootstrap button (evidence: `src/js/free/button.js`)
- Button behavior → Auto initialization: requests initialization (evidence: `src/js/free/button.js`)
- Input behavior → MDB base component: extends base (evidence: `src/js/free/input.js`)
- Input behavior → MDB DOM utilities: uses DOM helpers (evidence: `src/js/free/input.js`)
- Input behavior → Auto initialization: requests initialization (evidence: `src/js/free/input.js`)
- Ripple effect → MDB base component: extends base (evidence: `src/js/free/ripple.js`)
- Ripple effect → MDB DOM utilities: uses DOM helpers (evidence: `src/js/free/ripple.js`)
- Ripple effect → MDB utilities: creates elements (evidence: `src/js/free/ripple.js`)
- Ripple effect → Auto initialization: requests initialization (evidence: `src/js/free/ripple.js`)
- Perfect scrollbar → Scrollbar geometry: updates geometry (evidence: `src/js/mdb/perfect-scrollbar/index.js`)
- Perfect scrollbar → Scrollbar classes: uses class names (evidence: `src/js/mdb/perfect-scrollbar/index.js`)
- Scrollbar geometry → Scrollbar classes: sets state classes (evidence: `src/js/mdb/perfect-scrollbar/update-geometry.js`)
