Phoenix Duskmoon UI

Copy Markdown View Source

Duskmoon UI component library for Phoenix LiveView applications.

Phoenix Duskmoon UI provides 60+ ready-to-use LiveView components that render as native HTML or HTML Custom Elements, powered by the @duskmoon-dev/core design system and @duskmoon-dev/elements web component packages.

Architecture

Phoenix LiveView
       │
       ▼
┌──────────────────┐
│  HEEX Components │  ← dm_btn, dm_card, dm_input (API layer)
│  (dm_* prefix)   │
└────────┬─────────┘
         │
         ▼
┌──────────────────┐
│ HTML / Elements  │  ← .card, .badge, <el-dm-button> (rendering layer)
│  (el-dm-* tags)  │
└────────┬─────────┘
         │
         ▼
┌──────────────────┐
│ @duskmoon-dev/   │  ← CSS custom properties, design tokens
│     core         │
└──────────────────┘

HEEX components provide a familiar Phoenix API (attr/3, slot/2, form field binding). Simple components render native HTML with Core classes; complex elements use custom elements with shadow DOM encapsulation. The @duskmoon-dev/core design system provides all colors, typography, spacing, and elevation tokens through CSS custom properties.

Quick Install

# mix.exs
{:phoenix_duskmoon, "~> 10.0"}
mix npm.install @duskmoon-dev/core @duskmoon-dev/elements

See the Getting Started guide for full setup instructions.

Component Categories

CategoryExamplesCount
ActionButton, Dropdown, Link, Menu, Toggle5
Data DisplayCard, Table, Badge, Avatar, Datetime, Markdown Body, Pagination, Timeline19
Data EntryInput, Select, Checkbox, Switch, Autocomplete, TreeSelect19
FeedbackDialog, Loading, Snackbar, Toast4
NavigationAppbar, Breadcrumb, Tab, Stepper, PageHeader12
LayoutDivider, Drawer, BottomSheet, ThemeSwitcher4
IconMaterial Design Icons, Bootstrap Icons1
CSS ArtSnow, Eclipse, PlasmaBall, Signature, SpotlightSearch6

Guides

  • Getting Started — Installation, view helpers, CSS and JS setup
  • Migrating to v9 — Upgrade guide from v6/v7/v8 (DaisyUI to @duskmoon-dev/core)
  • Theming — Sunshine/moonlight themes, CSS custom properties, custom colors
  • Hooks — JavaScript hooks reference for LiveView integration