# `Skullet.Boot`
[🔗](https://github.com/gilbertwong96/skullet/blob/main/lib/skullet/boot.ex#L1)

Draws the skeletons already in the server's HTML **before the browser's first paint**.

Without it, the sample is laid out and hidden from the first paint, but the bars only
appear once the engine's bundle has loaded and the LiveView has mounted — a blank box
for those few hundred milliseconds. The script measures and draws synchronously, using
the same geometry, metrics and shimmer code the engine uses.

Render it once per page, after the markup it measures:

    <Skullet.Boot.boot nonce={@nonce} />

It is about 9KB of JavaScript inlined into the page, so it is your call to place it. Being
inline, a Content Security Policy needs its `nonce` — [usage](usage.html#content-security-policy)
has a plug that makes one and carries it into the LiveView.

# `boot`

```elixir
@spec boot(map()) :: Phoenix.LiveView.Rendered.t()
```

## Attributes

* `nonce` (`:string`) - the CSP nonce for the inline script. Defaults to `nil`.

---

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