> For the complete documentation index, see [llms.txt](https://docs.nubrick.app/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.nubrick.app/editor/variables.md).

# 変数を利用する

component editorのいくつかの箇所では、変数を利用することができます。

変数は `{{ var }}` の記法で利用でき、アプリ上で展開されます。

<figure><img src="/files/MGLrWdUvEpppxU1PS7xM" alt="" width="375"><figcaption></figcaption></figure>

<figure><img src="/files/5xVocP4FD3oNTrpYSHQb" alt="" width="188"><figcaption></figcaption></figure>

### variables

以下の変数が利用できます。

#### user

ユーザー情報を参照できます。`setProperties` を利用してSDKで設定した任意の値を利用することができます。

* `user.id`
* `user.{key}`
  * e.g. `user.name`

ユーザープロパティの設定についてはSDKリファレンスを参照

* iOS: [NubrickSDK](/reference/ios/nubricksdk.md)
* Android: [NubrickSDK](/reference/android/nubricksdk.md)
* Flutter: [NubrickUser](/reference/flutter/nubrickuser.md)

#### props

ページに渡したpropsが参照できます。

* `props.{key}`

<figure><img src="/files/xni3pxpW9xyjr1RNFZJ6" alt="" width="267"><figcaption></figcaption></figure>

#### data

ページ読み込み時に取得したdataが参照できます。

* `data.{key}`

<figure><img src="/files/iefWT5fPLywEUVSAYDoA" alt="" width="274"><figcaption></figcaption></figure>

#### form

component内で入力されたformの値が参照できます。

* `form.{key}`

#### args

SDKで、Embedding ComponentやRemote ConfigのgetAsViewを呼び出す際に渡した引数を参照できます。

* `args.{key}`

#### experiment

* `experiment.id`
* `experiment.variantId`

#### project

* `project.id`

### format

`{{ var | format }}` の形式で、変数の展開時のformat形式を指定することができます。

#### letter case

英字を大文字・小文字に変換することができます

* `{{ var | upper }}`
* `{{ var | lower }}`

#### json

JSON stringifyして表示します。

* `{{ var | json }}`


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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.nubrick.app/editor/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.
