# `Dala.Spark.Dsl`
[🔗](https://github.com/manhvu/dala/blob/main/lib/dala/spark/dsl.ex#L1)

Spark DSL for declarative Dala screens.

Defines attributes for screen state and UI component entities that mirror
`Dala.Ui.Widgets` one-to-one. Container entities (`column`, `row`, `box`, `scroll`,
`modal`, `pressable`, `safe_area`) support nested children via Spark's
`entities` + `recursive_as` mechanism.

## Usage

    defmodule MyApp.CounterScreen do
      use Dala.Spark.Dsl

      dala do
        attribute :count, :integer, default: 0

        screen name: :counter do
          column padding: :space_md, gap: :space_sm do
            text "Count: @count", text_size: :xl
            button "Increment", on_tap: :increment
          end
        end
      end

      def handle_event(:increment, _params, socket) do
        {:noreply, Dala.Socket.assign(socket, :count, socket.assigns.count + 1)}
      end
    end

### Options

* `:extensions` (list of module that adopts `Spark.Dsl.Extension`) - A list of DSL extensions to add to the `Spark.Dsl`

* `:otp_app` (`t:atom/0`) - The otp_app to use for any application configurable options

* `:fragments` (list of `t:module/0`) - Fragments to include in the `Spark.Dsl`. See the fragments guide for more.

# `attributes`
*macro* 

# `dala`
*macro* 

# `screen`
*macro* 

---

*Consult [api-reference.md](api-reference.md) for complete listing*
