# Frame

带边框和内边距的截图与媒体包装器——可选配标题说明。

**Install:** `nimbus-docs add frame`  
**Source:** `src/components/ui/frame/`  
**Canonical:** https://nimbus-docs.cn/components/frame/

## Agent payload (JSON)

```json
{
  "slug": "frame",
  "name": "Frame",
  "description": "Decorative outer frame for screenshots and demos.",
  "tagline": "带边框和内边距的截图与媒体包装器——可选配标题说明。",
  "install": "nimbus-docs add frame",
  "sourcePath": "src/components/ui/frame/",
  "canonicalUrl": "https://nimbus-docs.cn/components/frame/",
  "props": [
    {
      "name": "caption",
      "type": "string",
      "required": false,
      "description": "在媒体下方居中显示的标题说明。"
    },
    {
      "name": "aspect",
      "type": "string",
      "required": false,
      "description": "将媒体区域锁定为指定宽高比（例如 \"16/9\"、\"4/3\"、\"1/1\"）。内部媒体使用 `object-fit: cover` 填充。"
    },
    {
      "name": "src",
      "type": "ImageMetadata | string",
      "required": false,
      "description": "导入的图片——通过 Astro 的图片流水线处理（现代格式、响应式 srcset、懒加载、无布局偏移）。字符串路径或 URL 会渲染为普通的懒加载 `<img>`。省略此属性则使用插槽。"
    },
    {
      "name": "alt",
      "type": "string",
      "required": false,
      "description": "`src` 的替代文本。装饰性图片使用 `\"\"`。"
    }
  ],
  "registryDependencies": [
    "cn"
  ],
  "dependencies": []
}
```
