> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 圖層動作

> 圖層動作 (實驗性)

# 圖層動作 (實驗性)

按鈕可用來顯示圖層的動作。

> [!WARNING]
>
> 圖層目前以實驗形式提供使用，可能會根據早期採用者的意見反應而變更行為。

## 屬性

`type` - *"layer"*。指定動作的類型

`target` - *string*。執行動作時應顯示之 [`layer`](https://docs.xbox.com/zh-TW/reference/system/touchadaptationkit/layout/game-streaming-touch-layer) 的名稱。

## 備註

**圖層動作**用來讓玩家能夠使圖層顯示。

如果 [`button`](https://docs.xbox.com/zh-TW/reference/system/touchadaptationkit/controls/game-streaming-touch-button) 是切換按鈕，`layer` 會持續顯示，直到再次按下 `button` 為止。

## 範例

#### 具有圖層動作以顯示 selectAbility 圖層的切換按鈕

```JSON theme={null}
{
    "type": "button",
    "action": {
        "type": "layer",
        "target": "selectAbility"
    },
    "styles": {
        "default": {
            "faceImage": {
                "type": "icon",
                "value": "add"
            }
        }
    },
    "toggle" : true
}
```

## 另請參閱

[觸控調整套件參考](https://docs.xbox.com/zh-TW/build/core-features/common/game-streaming/game-streaming-touch-touch-adaptation-kit-overview.md)\
[按鈕](https://docs.xbox.com/zh-TW/reference/system/touchadaptationkit/controls/game-streaming-touch-button.md)\
[圖層](https://docs.xbox.com/zh-TW/reference/system/touchadaptationkit/layout/game-streaming-touch-layer.md)


## Related topics

- [圖層](https://docs.xbox.com/zh-TW/reference/system/touchadaptationkit/layout/game-streaming-touch-layer.md)
- [動作](https://docs.xbox.com/zh-TW/reference/system/touchadaptationkit/types/game-streaming-touch-action.md)
- [觸控調整套件 (TAK) 參考](https://docs.xbox.com/zh-TW/build/core-features/common/game-streaming/game-streaming-touch-touch-adaptation-kit-overview.md)
- [Touch Adaptation Kit](https://docs.xbox.com/zh-TW/reference/system/touchadaptationkit/touchadaptationkit-reference.md)
- [內容](https://docs.xbox.com/zh-TW/reference/system/touchadaptationkit/layout/game-streaming-touch-layout-content.md)
