AshFormBuilder.Themes.Mishka (AshFormBuilder v0.2.0)

View Source

Example MishkaChelekom theme for AshFormBuilder.

Setup

  1. Generate the required mishka_chelekom components in your Phoenix app:

    mix mishka.ui.gen.component text_field
    mix mishka.ui.gen.component textarea_field
    mix mishka.ui.gen.component native_select
    mix mishka.ui.gen.component checkbox_field
    mix mishka.ui.gen.component number_field
    mix mishka.ui.gen.component email_field
    mix mishka.ui.gen.component password_field
    mix mishka.ui.gen.component date_time_field
    mix mishka.ui.gen.component url_field
  2. Copy this module into your app (e.g. lib/my_app_web/form_builder/mishka_theme.ex), update the module name and the import statement to match your generated module path, then activate it:

    # config/config.exs
    config :ash_form_builder, :theme, MyAppWeb.FormBuilder.MishkaTheme

Notes

  • Mishka components accept a color and variant prop — adjust the defaults below to match your design system.
  • The <.native_select> component is used for :select fields. If you prefer <.combobox> for searchable dropdowns, swap it in render_field/1.
  • Error rendering uses @form[@field.name].errors — Mishka components typically accept an errors prop; wire it as shown in the render_field clause.