# Types of Variables

{% hint style="info" %}
This documentation is about setting variables on the current frame, tab, or browser session.

If you need to store data that are accessible to multiple team members, or across browser profiles, see PixieBrix’s [Team Databases](/storing-data-with-team-databases.md) feature
{% endhint %}

### Variable Type Summary

Variables in PixieBrix work similarly to variable in other Low-Code Application Platforms and programming languages.&#x20;

There are two special variable types made available by PixieBrix for providing configuration and starter brick run context: Mod Options and Starter Brick Input Variables.

<table><thead><tr><th width="155.21484375">Variable Type</th><th width="168.68359375">Referencing the Variable</th><th>Scope/Lifetime</th><th width="221.5546875">When Set/Configured</th></tr></thead><tbody><tr><td>Local Variable</td><td>Varies: the variable name is configured via the "Output Variable"  for a brick</td><td>Available to all bricks after the brick at the same, or deeper nested level</td><td>Output from a Brick</td></tr><tr><td>Mod Variable</td><td><code>@mod</code></td><td>Available to all non-starter bricks in the Mod<br><br>Can be configured to be automatically synchronized across frames/tabs. See <a data-mention href="/pages/dVPMsGQI5o7ZG0dOImUe#mod-variable-synchronization-policy">/pages/dVPMsGQI5o7ZG0dOImUe#mod-variable-synchronization-policy</a></td><td><p>Mod Variable Bricks: Assign Mod Variable, Run with Async Mod Variable, Run with Cache<br></p><p>Advanced Bricks:<br>Set Shared Page State</p></td></tr><tr><td>Mod Option</td><td><code>@options</code></td><td>Declared in the "Input Form" in the Page Editor<br><br>Available to all bricks in a Mod</td><td>Read-only within a Mod<br><br>Configured when Activating a Mod <br><br>Configured when Deploying a Mod. See <a data-mention href="/pages/a4NKSi5TDSYJDC5qkit0">/pages/a4NKSi5TDSYJDC5qkit0</a></td></tr><tr><td>Starter Brick Input Variable </td><td><code>@input</code></td><td>Available to all bricks in a Mod Component</td><td>Read-only within a Mod<br><br>Automatically, when the Starter Brick runs</td></tr></tbody></table>

### Advanced: Shared Page State

{% hint style="info" %}
Page State has been superseded by Mod Variables for working with mod-scoped data. Mod Variables are easy to reference via `@mod` , and enable PixieBrix to apply automatic performance optimizations
{% endhint %}

Page State is in-memory storage used to: 1) persist information across starter brick runs, 2) share data between mod components and/or mods. For detailed information on using Page State, see [Advanced: Using Page State](/developing-mods/developer-concepts/variables-and-data-context/advanced-using-page-state.md)

There are two primary built-in bricks for working with Page State:

* Get shared page state
* Set shared page state

Page State can be assigned to 3 available namespaces:

* Private: visible only to bricks within a single Mod Component
* Mod: visible to all bricks in a single Mod
* Public: visible to all Mods


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.pixiebrix.com/developing-mods/developer-concepts/variables-and-data-context/types-of-variables.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
