PhiaUi.ComponentRegistry (phia_ui v0.1.16)

Copy Markdown View Source

Source of truth for all 650 PhiaUI components.

Each entry is keyed by an atom and contains:

  • :name — snake_case string identifier
  • :module — the Elixir module that will be generated on ejection
  • :template_file — path inside priv/templates/ for the EEx source
  • :js_hooks — list of JS hook names required by this component
  • :dependencies — list of component atoms this component composes
  • :tier — domain tier (:primitive | :interactive | :form | :navigation | :shell | :widget)

  • :shadcn_equivalent — matching shadcn/ui component name, or nil
  • :status:planned or :implemented

Usage

# All components
PhiaUi.ComponentRegistry.all()

# Single lookup
PhiaUi.ComponentRegistry.get(:button)

# Filter by tier
PhiaUi.ComponentRegistry.by_tier(:primitive)

Summary

Functions

Returns the full registry map — all 650 component metadata entries.

Returns all components in a given tier.

Returns metadata for a single component by key, or nil if not found.

Types

component_meta()

@type component_meta() :: %{
  name: String.t(),
  module: module(),
  template_file: String.t(),
  js_hooks: [String.t()],
  dependencies: [atom()],
  tier: tier(),
  shadcn_equivalent: String.t() | nil,
  status: status()
}

status()

@type status() :: :planned | :implemented

tier()

@type tier() ::
  :primitive
  | :interactive
  | :form
  | :navigation
  | :shell
  | :widget
  | :layout
  | :animation
  | :surface

Functions

all()

@spec all() :: %{required(atom()) => component_meta()}

Returns the full registry map — all 650 component metadata entries.

by_tier(tier)

@spec by_tier(tier()) :: [component_meta()]

Returns all components in a given tier.

get(name)

@spec get(atom()) :: component_meta() | nil

Returns metadata for a single component by key, or nil if not found.