Corex (Corex v0.2.0)
View SourceImport Corex function components into your Phoenix web layer.
# lib/my_app_web.ex (inside html_helpers)
use CorexOptions:
only:list of component atoms (for example[:accordion, :dialog])except:list of component atoms to skipprefix:string prefix for wrappers (for exampleprefix: "ui"→<.ui_accordion>)use Corex, only: [:accordion, :select], prefix: "ui"
Guides: Installation, Manual installation, Forms, Design, MCP.
Summary
Functions
Returns sorted ids from the component registry for MCP and tooling.
Maps a string MCP component id to its implementing module when registered.
Resolves a registered component id to module and function-component metadata.
HEEx registry ids with no matching Design CSS id after _/- normalization.
Functions
@spec component_ids() :: [atom()]
Returns sorted ids from the component registry for MCP and tooling.
Maps a string MCP component id to its implementing module when registered.
@spec component_spec(atom()) :: {:ok, %{ id: atom(), module: String.t(), function_components: [%{name: atom(), arity: arity()}] }} | :error
Resolves a registered component id to module and function-component metadata.
@spec heex_only_ids() :: [atom()]
HEEx registry ids with no matching Design CSS id after _/- normalization.
These are helpers or LiveView-only entry points (action, heroicon, navigate,
hidden_input, file_upload_live). Aliased ones still resolve to a CSS host via
Corex.Design.Components.fetch_css_id/1 when Design is available.