Skip to content

Corex Generators + New Components#25

Merged
karim-semmoud merged 64 commits intomainfrom
corex-installer
Mar 13, 2026
Merged

Corex Generators + New Components#25
karim-semmoud merged 64 commits intomainfrom
corex-installer

Conversation

@karim-semmoud
Copy link
Member

@karim-semmoud karim-semmoud commented Mar 8, 2026

Summary

This PR introduces the first version of Corex generators and several improvements across the library.


Corex Generators

Adds project and code generators built on top of the Phoenix installer and mix phx.gen.* tasks.

mix corex.new

Extends mix phx.new with additional options to quickly scaffold a Phoenix + Corex application:

  • --mode – adds light/dark mode switching using Corex.ToggleGroup
  • --theme – adds theme switching using Corex.Select
  • --lang – adds language switching
  • --rtl – enables RTL support for selected languages
  • --design – includes Corex design tokens and component CSS (optional)
  • --designex – generates tokens using Designex, Style Dictionary, and Tokens Studio
  • --a11y – adds accessibility testing (Wallaby + a11y_audit)
  • --tidewave – includes Tidewave development tooling

The installer keeps Phoenix’s integration test approach to ensure generated apps compile, format, and pass tests in real usage.

mix corex.gen.html / mix corex.gen.live

Extensions of the Phoenix generators with built-in Corex component support.

Generated forms use Corex components such as:

  • Select
  • Checkbox
  • PasswordInput
  • DatePicker
  • Native inputs for other types

They also respect project configuration (mode, theme, and languages).


New Components

The following components were added:

  • Data Table (sorting + row selection)
  • Data List
  • Native Input (15+ types)
  • Layout Heading
  • Action
  • Navigate
  • Marquee
  • Code

Unified Translations

Components that require accessible text now use a single translations attribute with English defaults and full Gettext support.

This removes the need to manually provide common accessibility labels while still allowing full customization.


Phoenix Stream Support

Corex components that accept item lists can now work directly with Phoenix Streams.

Lists update dynamically while preserving component state and accessibility behavior (for example keyboard focus).

Form components were also updated to resolve a controlled-mode issue related to ZagJS machine bindings.


Corex Design

Updated default themes demonstrate that any design token (not only colors) can vary per theme or mode, including spacing, border radius, and more.

Corex Design remains fully optional. All components are unstyled and can be used independently within existing design systems.


Upgrade Notes

Corex is still alpha. Some undocumented breaking changes may exist (for example attribute renames such as collectionitems).

If you encounter issues during upgrade, feedback is welcome.

@karim-semmoud karim-semmoud self-assigned this Mar 8, 2026
@karim-semmoud karim-semmoud changed the title Corex Generators Corex Generators + New Components Mar 13, 2026
@karim-semmoud karim-semmoud merged commit 47d05fb into main Mar 13, 2026
11 checks passed
@karim-semmoud karim-semmoud deleted the corex-installer branch March 13, 2026 10:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant