‹ 首页

react-zmage-integration

@caldis · 收录于 1 周前 · 上游提交 2 个月前

Use when adding the react-zmage React image viewer to an existing React, Next.js, MDX, CMS, markdown, or rich text image surface.

适合你,如果你需要在 React 或 Next.js 项目中添加图片查看功能。

/ 通过 npx 安装 校验哈希
npx oh-my-skill add caldis/react-zmage/react-zmage-integration
/ 通过 bash 安装
curl -fsSL https://oh-my-skill.com/install.sh | bash -s -- caldis/react-zmage/react-zmage-integration
/ 已经装过?验证本机副本,不用重装
npx oh-my-skill verify caldis/react-zmage/react-zmage-integration
安装目标可用 --agent / --scope 或 --to 明确指定;省略时只会在唯一已存在的 agent 目录上自动选择,零命中或多命中会停止并提示。content_hash 缺失或不一致均拒装。
940GitHub stars
~333最小装载
~333含声明引用
~479K文本包总量
索引托管

怎么用

商店整理自技能原文 · 版本 bd9b97d · 表述以原文为准
它做什么

安装后,Claude 能帮你为 React 应用添加图片查看器,支持全屏预览、缩放和画廊浏览。

什么时候触发

当用户想在 React、Next.js、MDX、CMS、Markdown 或富文本中实现图片全屏预览或缩放时触发。

装好后可以这样说
Claude 会安装包并配置基本用法。
Claude 会使用 Wrapper 模式包裹图片。
Claude 会使用 Imperative 模式实现。
技能原文 SKILL.md作者撰写 · MIT · bd9b97d

react-zmage Integration

When to use this skill

Use this skill when a user wants fullscreen image preview, image zoom, a React lightbox alternative, CMS image preview, MDX image preview, or gallery browsing in a React app.

Do not use this skill for unrelated image processing, server-side media transformation, account automation, OAuth setup, webhook setup, or MCP server work. react-zmage is a client-side React package.

Read first

Fetch https://zmage.caldis.me/llms.txt first. Use https://zmage.caldis.me/llms-full.txt when you need the full README and repository agent notes in one request.

Install with:

npm install react-zmage

Import the stylesheet once from the app-level style entry:

import 'react-zmage/style.css'

Choose the smallest mode that matches the user's image surface:

  • Component mode for owned React image markup: <Zmage src="..." alt="..." />.
  • Wrapper mode for CMS, MDX, markdown, rich text, or generated HTML: <Zmage.Wrapper>{children}</Zmage.Wrapper>.
  • Imperative mode for buttons, commands, callbacks, or non-image events: Zmage.browsing(options).

Prefer omitted preset so it resolves to auto. Keep optional behavior props unset during a basic install unless the user asks for them or testing exposes a concrete need.

按 MIT 许可原样转载,未经改动 · 在 GitHub 查看 →

评论

登录即可评论;带「已验证安装」的,是发布者名下有本店的安装或持有记录。