把展开前也能独立读懂的标签放入 `summary`，把补充内容放在子节点中。例如“排版细节”可以展开为具体的格式设置。链接和其他操作放在详情区域内。

```tsx
'use client'

import { Disclosure } from '@ancrel/ui'
import '@ancrel/tokens/css'
import '@ancrel/ui/styles.css'

export default function App() {
  return <Disclosure summary="Formatting details">
    <ul><li>Trim trailing spaces</li><li>Keep paragraph breaks</li></ul>
  </Disclosure>
}
```

Expected:

Formatting details starts collapsed. Activate the button to reveal both formatting options, and activate it again to collapse the list.

Build `@ancrel/tokens` and `@ancrel/ui` from the workspace root, then run `pnpm --filter @ancrel/example-disclosure test`.

## 键盘与状态

摘要是原生按钮，支持 Enter 和空格。按钮通过 `aria-expanded` 表示当前状态，`aria-controls` 指向对应的详情元素。收起时，详情中的表单字段保留其值并退出键盘导航。

默认收起。使用 `defaultOpen` 可让详情首次显示时展开。若其他控件也可以切换同一区域，传入 `open` 并在 `onOpenChange` 中更新它。减少动态效果时，按钮和详情直接切换到最终状态。

| `Prop` | `Type` | `Required` | `Default` |
| - | - | - | - |
| `children` | `ReactNode` | `false` | `—` |
| `className` | `string` | `false` | `—` |
| `defaultOpen` | `boolean` | `false` | `—` |
| `key` | `React.Key \| null \| undefined` | `false` | `—` |
| `onOpenChange` | `((open: boolean) => void) \| undefined` | `false` | `—` |
| `open` | `boolean` | `false` | `—` |
| `ref` | `React.Ref<HTMLDetailsElement> \| undefined` | `false` | `—` |
| `summary` | `ReactNode` | `true` | `—` |

```ts
import * as React from 'react';
import type { DisclosureProps } from './types.js';
export declare const Disclosure: React.ForwardRefExoticComponent<DisclosureProps & React.RefAttributes<HTMLDetailsElement>>;
```

`--ac-sys-motion-normal`

| `Context` | `--ac-sys-motion-normal` |
| - | - |
| `dark/compact` | `180ms` |
| `dark/comfortable` | `180ms` |
| `light/compact` | `180ms` |
| `light/comfortable` | `180ms` |
