# `A2UI.BoundValue`
[🔗](https://github.com/23min/ex_a2ui/blob/main/lib/a2ui/bound_value.ex#L1)

A value that can be a literal, a data model binding (JSON Pointer path), or both.

When both `literal` and `path` are set, the literal provides the initial value
and the path creates a reactive binding — the component updates automatically
when the data model changes at that path.

## Examples

    # Static value
    %A2UI.BoundValue{literal: "Hello"}

    # Bound to data model
    %A2UI.BoundValue{path: "/user/name"}

    # Initial value with binding
    %A2UI.BoundValue{literal: "loading...", path: "/user/name"}

# `t`

```elixir
@type t() :: %A2UI.BoundValue{literal: term() | nil, path: String.t() | nil}
```

# `bind`

```elixir
@spec bind(String.t()) :: t()
```

Creates a BoundValue bound to a data model path.

# `bind`

```elixir
@spec bind(String.t(), term()) :: t()
```

Creates a BoundValue with both a literal and a binding path.

# `literal`

```elixir
@spec literal(term()) :: t()
```

Creates a BoundValue with a literal value.

---

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