Skip to content
Corex

The Phoenix UI with API, Events, Anatomy, Design, and Accessibility.

Accessible, unstyled Phoenix components with a full server-and-client API, powered by Zag.js state machines.

  • Server & client API. Drive every component from LiveView or JavaScript and listen back from either side.
  • LiveView-native. Update props at runtime without resetting component state.
  • Truly unstyled. Bring your own CSS or opt into Corex Design tokens, themes and modes.
  • Accessible by default. Keyboard, focus and ARIA wired in by Zag.js state machines.

Interactive preview

API
Accordion

Structure, custom slots, compound mode.

Zag.js powers accessibility, keyboard, and focus.

Events
Time Open items

Toggle the accordion to watch events land.

Built for the Elixir ecosystem

  • 43+

    Components

    Works in Controller and Live View

  • 100+

    API & Events

    From the Server and the Client

  • 100%

    Open Source

    Open Source and free to use. MIT License

  • A11y

    Built in

    Keyboard, focus and ARIA from Zag.js machines.

Powered by the stack you already use

Authoring

Flexible anatomy with HEEx

Same Zag machine. Items, manual slots, or custom slots. Pick the shape that fits your markup.

Items + indicator

Declarative items list with a shared indicator slot.

Consectetur adipiscing elit.

Nullam eget vestibulum ligula.

    <.accordion class="accordion" value="lorem" items={@items}>
  <:indicator>
    <.heroicon name="hero-chevron-right" />
  </:indicator>
</.accordion>

  

Manual slots

Author each trigger and content by value. No items list required.

Consectetur adipiscing elit. Sed sodales ullamcorper tristique.

Nullam eget vestibulum ligula, at interdum tellus.

    <.accordion class="accordion" value="lorem">
  <:trigger value="lorem">
    <.heroicon name="hero-chat-bubble-left-right" /> Lorem ipsum dolor sit amet
  </:trigger>
  <:content value="lorem">
    <p>Consectetur adipiscing elit. Sed sodales ullamcorper tristique.</p>
  </:content>
  <:indicator value="lorem">
    <.heroicon name="hero-chevron-right" />
  </:indicator>

  <:trigger value="duis">
    <.heroicon name="hero-device-phone-mobile" /> Duis dictum gravida odio
  </:trigger>
  <:content value="duis">
    <p>Nullam eget vestibulum ligula, at interdum tellus.</p>
  </:content>
  <:indicator value="duis">
    <.heroicon name="hero-chevron-right" />
  </:indicator>
</.accordion>

  

Custom slots

Own the trigger, content, and indicator with :let={item}. Stack your own chrome.

Elixir, Phoenix, and Ecto on the server. One assign feeds the accordion.

Zag.js and TypeScript drive accessible state in the browser.

    <.accordion class="accordion" value="server" items={@items}>
  <:trigger :let={item}>
    <span class="inline-flex -space-x-2">
      <img
        :for={tech <- item.meta.tech}
        src={tech.src}
        alt={tech.alt}
        class="size-6 rounded-full ring-2 ring-surface"
      />
    </span>
    {item.label}
  </:trigger>
  <:content :let={item}><p>{item.content}</p></:content>
  <:indicator>
    <.heroicon name="hero-chevron-right" />
  </:indicator>
</.accordion>

  

In production

Built with Corex

Sites and products shipping Corex in the wild.

See all showcases
Netoum homepage

Netoum

The company behind Corex: product design, accessible web apps, and open-source tooling.

  • Company
  • Open source
Oranje Patrimoine homepage

Oranje Patrimoine

Paris property-management site built with Corex, a CMS admin, and a contact form.

  • Landing
  • Tableau
  • CMS

Get started

Install Corex

Compose your generator command, then copy from the terminal.

Generator
More info
App name
More info
Defaults
More info
Add-ons
More info
Archives
More info
    mix archive.install hex phx_new
mix archive.install hex corex_new
  
Command
More info
    mix corex.new my_app