Corex api

From corex-ui/corex · View interactive version

Corex api is an AI agent skill from the GitHub repository corex-ui/corex. Load when using Corex.Accordion.set_value, Corex.Dialog.set_open, phx-click with Corex.* JS commands, socket helpers Corex.*(socket, id, …), controlled mode with value assign, assign_async with accordion_skeleton, toast_group flash, or mix usage_rules.search_docs set_value -p corex. For on_*_change

How to use this skill

Skill file

Corex API

Imperative push API — not event subscriptions (on_*_change → corex-events).

Client — `<.action>`

<.action class="button" phx-click={Corex.Accordion.set_value("faq", ["first"])}>
  Open first
</.action>

Server — socket helper

def handle_event("open_first", _params, socket) do
  {:noreply, Corex.Accordion.set_value(socket, "faq", ["first"])}
end

Controlled mode

Pair controlled, value, and on_value_change:

<.accordion id="faq" controlled value={@open} on_value_change="faq_value_change" class="accordion" items={…} />

Discovery

MCP get_component { id: "<name>" } → structured api, or search_docs / mix usage_rules.search_docs "set_value" -p corex.

Full checklist: sub-rule corex:api.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.