> ## 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.

# Knob

> Knob

# Knob

可供玩家交互的、类似按钮组件的样式属性。

## 属性

`background` - *object*，*可选*。可以是 [color](https://docs.xbox.com/zh-CN/reference/system/touchadaptationkit/types/game-streaming-touch-color.md) 或 [image asset](https://docs.xbox.com/zh-CN/reference/system/touchadaptationkit/types/game-streaming-touch-asset.md)。

`faceImage` - *object*，*可选*。可以是 [icon](https://docs.xbox.com/zh-CN/reference/system/touchadaptationkit/types/game-streaming-touch-icon.md) 或 [image asset](https://docs.xbox.com/zh-CN/reference/system/touchadaptationkit/types/game-streaming-touch-asset.md)。

`opacity` - *number*，*可选*。要应用于该组件的不透明度。除 `disabled` 状态外，所有状态默认为 1.0。

[`stroke`](https://docs.xbox.com/zh-CN/reference/system/touchadaptationkit/types/game-streaming-touch-stroke) - *object*，*可选*。用于该组件轮廓的 [stroke](https://docs.xbox.com/zh-CN/reference/system/touchadaptationkit/types/game-streaming-touch-stroke.md) 样式设置。

## 示例

```JSON theme={null}
{
    "knob": {
        "background" : {
            "type": "color",
            "value":  "#107C10"
        },
        "faceImage" : {
            "type": "icon",
            "value": "run"
        }
    },
}
```

## 备注

`knob` 是更复杂控件（例如 [joystick](https://docs.xbox.com/zh-CN/reference/system/touchadaptationkit/controls/game-streaming-touch-joystick.md)、
[throttle](https://docs.xbox.com/zh-CN/reference/system/touchadaptationkit/controls/game-streaming-touch-throttle.md)）的一个组成部分，
可供玩家进行交互。

`knob` 的默认视觉样式因控件而异。

## 相关控件

[Joystick](https://docs.xbox.com/zh-CN/reference/system/touchadaptationkit/controls/game-streaming-touch-joystick.md)\
[Throttle](https://docs.xbox.com/zh-CN/reference/system/touchadaptationkit/controls/game-streaming-touch-throttle.md)

## 另请参阅

[Touch Adaptation Kit 参考](https://docs.xbox.com/zh-CN/build/core-features/common/game-streaming/game-streaming-touch-touch-adaptation-kit-overview.md)


## Related topics

- [触控适配布局的自定义资产](https://docs.xbox.com/zh-CN/build/core-features/common/game-streaming/building-touch-layouts/game-streaming-tak-custom-assets.md)
- [Throttle](https://docs.xbox.com/zh-CN/reference/system/touchadaptationkit/controls/game-streaming-touch-throttle.md)
- [Joystick](https://docs.xbox.com/zh-CN/reference/system/touchadaptationkit/controls/game-streaming-touch-joystick.md)
- [Touch Adaptation Kit](https://docs.xbox.com/zh-CN/reference/system/touchadaptationkit/touchadaptationkit-reference.md)
- [Touch Adaptation Kit (TAK) 参考](https://docs.xbox.com/zh-CN/build/core-features/common/game-streaming/game-streaming-touch-touch-adaptation-kit-overview.md)
