# `Harlock.Focus`
[🔗](https://github.com/thatsme/harlock/blob/v0.2.0/lib/harlock/focus.ex#L1)

Read access to focus state during `view/1` and `update/2` callbacks.

Focus state itself lives in the runtime; this module exposes it via the
process dictionary, set by the runtime immediately before invoking app
callbacks. Don't try to call this from outside a Harlock callback —
there's no global state to read.

Mutation (setting focus, advancing it manually) returns a `Cmd` to the
runtime. v0.1 ships `Cmd.focus/1`; richer programmatic control arrives
alongside the full Cmd executor.

# `current`

```elixir
@spec current() :: any()
```

The id of the currently focused element, or `nil` if no focusable element
exists. Call this from inside `update/2` or `view/1`.

---

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