mix sutra_ui.install (Sutra UI v0.4.0)

View Source

Installs Sutra UI into your Phoenix application.

$ mix sutra_ui.install

This task will:

  1. Add the CSS import to your assets/css/app.css
  2. Add use SutraUI to your web module's html_helpers

After running this task, you need to manually:

  1. Delete lib/my_app_web/components/core_components.ex
  2. Remove the import MyAppWeb.CoreComponents line from your web module

Colocated Hooks

Sutra UI uses Phoenix 1.8+ colocated hooks. Most hooks load at runtime. Extracted hooks use the generated phoenix-colocated/sutra_ui bundle.

Options

  • --no-css - Skip CSS setup
  • --no-web - Skip web module setup
  • --dry-run - Show what would be changed without making changes