# `LivePanels.Canvas.Layout.Strategy`
[🔗](https://github.com/livepanels/livepanels/blob/v0.1.0/lib/livepanels/canvas/layout/strategy.ex#L1)

Behaviour for headless canvas layout strategies.

Strategies receive a `%LivePanels.Canvas.Layout.Context{}` plus normalized
params. They return placement maps only. LivePanels owns authorization,
reducer application, history, persistence, shared fanout, and browser
projection.

# `placement`

```elixir
@type placement() :: %{
  :id =&gt; String.t(),
  :space =&gt; :world,
  :anchor =&gt; :top_left,
  :x =&gt; integer(),
  :y =&gt; integer(),
  optional(:w) =&gt; number(),
  optional(:h) =&gt; number()
}
```

# `plan`

```elixir
@callback plan(LivePanels.Canvas.Layout.Context.t(), LivePanels.Canvas.Layout.Options.t()) ::
  {:ok, [placement()]} | {:error, term()}
```

---

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