mix mishka.ui.gen.headless (Mishka Chelekom v0.0.9-beta.3)

Copy Markdown View Source

Generate an unstyled (headless) Phoenix component: ARIA + slots + behavior hook

Headless components ship no opinionated styling — only semantic markup, full WAI-ARIA wiring, named slots (anatomy "parts"), structural base classes (chelekom-<comp>__<part>), CSS custom properties, and data-* paired-presence state (data-open/data-closed, data-highlighted, …). Behavior is delegated to the shared JS engines.

Output goes to lib/<app>_web/components/headless/<name>.ex (module <App>Web.Components.Headless.<Name>), so styled and headless components coexist.

Templates live in priv/headless/<name>.eex (+ <name>.exs catalog). There are no --color/--variant/--size/--padding options — they are meaningless for headless.

Example

mix mishka.ui.gen.headless dialog

Options

  • --module or -m - Custom module name for the component
  • --component-prefix - Prefix for the public function name
  • --module-prefix - Prefix for the module name
  • --sub - Marks this as a dependency sub-generation
  • --no-save - Use prefixes without saving them to config
  • --yes - Apply without prompts

Summary

Functions

igniter(igniter)

Callback implementation for Igniter.Mix.Task.igniter/1.