Phoenix Duskmoon UI

View Source

Duskmoon UI component library for Phoenix LiveView applications.

Phoenix Duskmoon UI provides 60+ ready-to-use LiveView components that render as 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)   

         
         

  Custom Elements    <el-dm-button>, <el-dm-card> (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) while the rendering is handled by 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, "~> 9.0"}
bun add @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, Pagination, Timeline17
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