> For AI agents: the complete documentation index is available at /next/zh/llms.txt, the full documentation bundle is available at /next/zh/llms-full.txt.

# `<title-bar-view>` Clay Windows Clay macOS

APISummary
`<title-bar-view>` 标签用于自定义窗口的可拖拽区域。

## 用法

**下面是一个示例: title-bar-view**

**Bundle:** `dist/base.lynx.bundle`

```tsx
// Copyright 2026 The Lynx Authors. All rights reserved.
// Licensed under the Apache License Version 2.0 that can be found in the
// LICENSE file in the root directory of this source tree.

import { root, useRef, useState } from "@lynx-js/react";

const App = () => {
  return (
    <view
      style={{
        width: "100%",
        height: "100%",
        flexDirection: "column",
        backgroundColor: "white",
      }}
    >
      <title-bar-view moveable={true} style={{ width: "100%", height: "50px", backgroundColor: "red" }}>
        <text style={{ fontSize: "30px" }}>Title Bar View, drag me</text>
      </title-bar-view>
    </view>
  );
};

root.render(<App />);

if (import.meta.webpackHot) {
  import.meta.webpackHot.accept();
}

```

v0.7.0



`<title-bar-view>` 元素类似于 Web 中的 `app-region` 样式，允许开发者自定义窗口的可拖拽区域。

## 属性

### `moveable`

Clay Windows
Clay macOS
```tsx
// @defaultValue: false
moveable?: boolean;
```

当设置为 `true` 时，拖拽 title bar view 可以移动窗口。

## 兼容性

**Compatibility Table**

**Query:** `elements.title-bar-view`

[Source](https://github.com/lynx-family/lynx-website/tree/main/packages/lynx-compat-data/elements/title-bar-view.json)

| Feature | Android | HarmonyOS | iOS | macOS | Windows | Web |
| --- | --- | --- | --- | --- | --- | --- |
| title-bar-view | No | No | No | Yes (3.8) | Yes (3.8) | No |
| moveable | No | No | No | Yes (3.8) | Yes (3.8) | No |
| boundingClientRect | No | No | No | Yes (4.0) | Yes (4.0) | No |
| requestAccessibilityFocus | No | No | No | No | No | No |
| scrollIntoView | No | No | No | Yes (4.0) | Yes (4.0) | No |
| setFocus | No | No | No | Yes (4.0) | Yes (4.0) | No |
| takeScreenshot | No | No | No | Yes (4.0) | Yes (4.0) | No |

**`title-bar-view`**

title-bar-view

**`moveable`**

<code>moveable</code>

**`boundingClientRect`**

<code>boundingClientRect</code>

**`requestAccessibilityFocus`**

<code>requestAccessibilityFocus</code>

**`scrollIntoView`**

<code>scrollIntoView</code>

**`setFocus`**

<code>setFocus</code>

**`takeScreenshot`**

<code>takeScreenshot</code>

