# oddmash/oddmash-ui architecture

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

- Interactive diagram: https://gitdiagram.com/oddmash/oddmash-ui
- Repository: https://github.com/oddmash/oddmash-ui

## Overview

Oddmash UI is a shared, themeable React component library for Oddmash products. Its principal workflow is a product developer importing the public API and composing accessible controls, form inputs, overlays, feedback, navigation, or data-display components into a product interface. The library also provides documentation-oriented primitives and interaction patterns such as command search, copy feedback, and managed notifications. README-described tokens and themes are part of the product scope, but their implementation is not represented in the supplied source tree. Relationships below are limited to exports and calls/imports visible in the supplied excerpts or source index.

Main entry points: [`src/index.ts`](https://github.com/oddmash/oddmash-ui/blob/main/src/index.ts) (Component exports), [`src/button.tsx`](https://github.com/oddmash/oddmash-ui/blob/main/src/button.tsx) (Buttons), [`src/command-palette.tsx`](https://github.com/oddmash/oddmash-ui/blob/main/src/command-palette.tsx) (Command search), [`src/select.tsx`](https://github.com/oddmash/oddmash-ui/blob/main/src/select.tsx) (Select control)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["Public API"]
  node_public_api["Component exports<br/>[index.ts]"]
end

subgraph group_controls["Controls and Overlays"]
  node_button["Buttons<br/>[button.tsx]"]
  node_input["Text input<br/>[input.tsx]"]
  node_select["Select control<br/>[select.tsx]"]
  node_select_dropdown["Select behavior"]
  node_date_select["Date and time<br/>[date-select.tsx]"]
  node_dialog["Dialog overlay<br/>[dialog.tsx]"]
  node_command_palette["Command search"]
  node_alert["Alerts<br/>[alert.tsx]"]
  node_slider["Slider<br/>[slider.tsx]"]
  node_other_components["Other UI components"]
end

subgraph group_docs["Documentation Primitives"]
  node_clipboard["Copy feedback"]
  node_docs_navigation["Docs navigation"]
  node_locale_picker["Language selection<br/>[locale-picker.tsx]"]
  node_scroll_header["Scroll header<br/>[scroll-header.tsx]"]
end

subgraph group_shared["Shared Interaction"]
  node_toast_provider["Notification manager<br/>[toast-provider.tsx]"]
  node_toast["Toast display<br/>[toast.tsx]"]
  node_class_names["Class composition<br/>[cx.ts]"]
end

node_developer(("Product developer"))
node_consumer["React product"]

node_developer -->|"composes"| node_consumer
node_consumer -->|"imports"| node_public_api
node_public_api -->|"exports"| node_button
node_public_api -->|"exports"| node_input
node_public_api -->|"exports"| node_select
node_public_api -->|"exports"| node_date_select
node_public_api -->|"exports"| node_dialog
node_public_api -->|"exports"| node_command_palette
node_public_api -->|"exports"| node_alert
node_public_api -->|"exports"| node_slider
node_public_api -->|"exports"| node_clipboard
node_public_api -->|"exports"| node_docs_navigation
node_public_api -->|"exports"| node_locale_picker
node_public_api -->|"exports"| node_scroll_header
node_public_api -->|"exports"| node_toast_provider
node_public_api -->|"exports"| node_toast
node_public_api -->|"exports"| node_other_components
node_select -->|"delegates to"| node_select_dropdown
node_command_palette -->|"uses"| node_dialog
node_command_palette -->|"uses"| node_input
node_command_palette -->|"uses"| node_button
node_date_select -->|"uses"| node_button
node_clipboard -->|"uses"| node_button
node_docs_navigation -->|"uses"| node_button
node_locale_picker -->|"uses"| node_select
node_toast_provider -->|"uses"| node_toast
node_button -->|"composes classes"| node_class_names
node_select_dropdown -->|"composes classes"| node_class_names
node_toast -->|"composes classes"| node_class_names

click node_public_api "https://github.com/oddmash/oddmash-ui/blob/main/src/index.ts"
click node_button "https://github.com/oddmash/oddmash-ui/blob/main/src/button.tsx"
click node_input "https://github.com/oddmash/oddmash-ui/blob/main/src/input.tsx"
click node_select "https://github.com/oddmash/oddmash-ui/blob/main/src/select.tsx"
click node_select_dropdown "https://github.com/oddmash/oddmash-ui/blob/main/src/select-dropdown.tsx"
click node_date_select "https://github.com/oddmash/oddmash-ui/blob/main/src/date-select.tsx"
click node_dialog "https://github.com/oddmash/oddmash-ui/blob/main/src/dialog.tsx"
click node_command_palette "https://github.com/oddmash/oddmash-ui/blob/main/src/command-palette.tsx"
click node_alert "https://github.com/oddmash/oddmash-ui/blob/main/src/alert.tsx"
click node_slider "https://github.com/oddmash/oddmash-ui/blob/main/src/slider.tsx"
click node_clipboard "https://github.com/oddmash/oddmash-ui/blob/main/src/clipboard-button.tsx"
click node_docs_navigation "https://github.com/oddmash/oddmash-ui/blob/main/src/docs-navigation.tsx"
click node_locale_picker "https://github.com/oddmash/oddmash-ui/blob/main/src/locale-picker.tsx"
click node_scroll_header "https://github.com/oddmash/oddmash-ui/blob/main/src/scroll-header.tsx"
click node_toast_provider "https://github.com/oddmash/oddmash-ui/blob/main/src/toast-provider.tsx"
click node_toast "https://github.com/oddmash/oddmash-ui/blob/main/src/toast.tsx"
click node_class_names "https://github.com/oddmash/oddmash-ui/blob/main/src/cx.ts"
click node_other_components "https://github.com/oddmash/oddmash-ui/tree/main/src"

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_public_api toneBlue
class node_button,node_input,node_select,node_select_dropdown,node_date_select,node_dialog,node_command_palette,node_alert,node_slider,node_other_components toneAmber
class node_clipboard,node_docs_navigation,node_locale_picker,node_scroll_header toneMint
class node_toast_provider,node_toast,node_class_names toneRose
class node_developer,node_consumer toneIndigo
```

## Components

### Public API

- [Component exports](https://github.com/oddmash/oddmash-ui/blob/main/src/index.ts): `src/index.ts`

### Controls and Overlays

- [Buttons](https://github.com/oddmash/oddmash-ui/blob/main/src/button.tsx): `src/button.tsx`
- [Text input](https://github.com/oddmash/oddmash-ui/blob/main/src/input.tsx): `src/input.tsx`
- [Select control](https://github.com/oddmash/oddmash-ui/blob/main/src/select.tsx): `src/select.tsx`
- [Select behavior](https://github.com/oddmash/oddmash-ui/blob/main/src/select-dropdown.tsx): `src/select-dropdown.tsx`
- [Date and time](https://github.com/oddmash/oddmash-ui/blob/main/src/date-select.tsx): `src/date-select.tsx`
- [Dialog overlay](https://github.com/oddmash/oddmash-ui/blob/main/src/dialog.tsx): `src/dialog.tsx`
- [Command search](https://github.com/oddmash/oddmash-ui/blob/main/src/command-palette.tsx): `src/command-palette.tsx`
- [Alerts](https://github.com/oddmash/oddmash-ui/blob/main/src/alert.tsx): `src/alert.tsx`
- [Slider](https://github.com/oddmash/oddmash-ui/blob/main/src/slider.tsx): `src/slider.tsx`
- [Other UI components](https://github.com/oddmash/oddmash-ui/tree/main/src): `src`

### Documentation Primitives

- [Copy feedback](https://github.com/oddmash/oddmash-ui/blob/main/src/clipboard-button.tsx): `src/clipboard-button.tsx`
- [Docs navigation](https://github.com/oddmash/oddmash-ui/blob/main/src/docs-navigation.tsx): `src/docs-navigation.tsx`
- [Language selection](https://github.com/oddmash/oddmash-ui/blob/main/src/locale-picker.tsx): `src/locale-picker.tsx`
- [Scroll header](https://github.com/oddmash/oddmash-ui/blob/main/src/scroll-header.tsx): `src/scroll-header.tsx`

### Shared Interaction

- [Notification manager](https://github.com/oddmash/oddmash-ui/blob/main/src/toast-provider.tsx): `src/toast-provider.tsx`
- [Toast display](https://github.com/oddmash/oddmash-ui/blob/main/src/toast.tsx): `src/toast.tsx`
- [Class composition](https://github.com/oddmash/oddmash-ui/blob/main/src/cx.ts): `src/cx.ts`

### Other components

- **Product developer**
- **React product**

## Connections

- Product developer → React product: composes (evidence: `README.md`)
- React product → Component exports: imports (evidence: `README.md`)
- Component exports → Buttons: exports (evidence: `src/index.ts`)
- Component exports → Text input: exports (evidence: `src/index.ts`)
- Component exports → Select control: exports (evidence: `src/index.ts`)
- Component exports → Date and time: exports (evidence: `src/index.ts`)
- Component exports → Dialog overlay: exports (evidence: `src/index.ts`)
- Component exports → Command search: exports (evidence: `src/index.ts`)
- Component exports → Alerts: exports (evidence: `src/index.ts`)
- Component exports → Slider: exports (evidence: `src/index.ts`)
- Component exports → Copy feedback: exports (evidence: `src/index.ts`)
- Component exports → Docs navigation: exports (evidence: `src/index.ts`)
- Component exports → Language selection: exports (evidence: `src/index.ts`)
- Component exports → Scroll header: exports (evidence: `src/index.ts`)
- Component exports → Notification manager: exports (evidence: `src/index.ts`)
- Component exports → Toast display: exports (evidence: `src/index.ts`)
- Component exports → Other UI components: exports (evidence: `src/index.ts`)
- Select control → Select behavior: delegates to (evidence: `src/select.tsx`)
- Command search → Dialog overlay: uses (evidence: `src/command-palette.tsx`)
- Command search → Text input: uses (evidence: `src/command-palette.tsx`)
- Command search → Buttons: uses (evidence: `src/command-palette.tsx`)
- Date and time → Buttons: uses (evidence: `src/date-select.tsx`)
- Copy feedback → Buttons: uses (evidence: `src/clipboard-button.tsx`)
- Docs navigation → Buttons: uses (evidence: `src/docs-navigation.tsx`)
- Language selection → Select control: uses (evidence: `src/locale-picker.tsx`)
- Notification manager → Toast display: uses (evidence: `src/toast-provider.tsx`)
- Buttons → Class composition: composes classes (evidence: `src/button.tsx`)
- Select behavior → Class composition: composes classes (evidence: `src/select-dropdown.tsx`)
- Toast display → Class composition: composes classes (evidence: `src/toast.tsx`)
