Skip to main content
Designkufu

smarthr-ui-file-viewer

FileViewerは、画像やPDFファイルを表示・拡大縮小・回転できるファイルビューアーコンポーネントです。ファイルの内容をプレビューするときに使います。

Stars
30
Source
kufu/smarthr-design-system
Updated
2026-05-29
Slug
kufu--smarthr-design-system--smarthr-ui-file-viewer
View on GitHubRaw SKILL.md

// install — copy + paste into any project

mkdir -p .claude/skills && curl -fsSL https://raw.githubusercontent.com/kufu/smarthr-design-system/HEAD/plugins/smarthr-design-system/skills/smarthr-ui-file-viewer/SKILL.md -o .claude/skills/smarthr-ui-file-viewer.md

Drops the SKILL.md into .claude/skills/smarthr-ui-file-viewer.md. Works with Claude Code, Cursor, and any agent that loads SKILL.md files from .claude/skills/.

画像やPDFファイルを表示・拡大縮小・回転できるファイルビューアーコンポーネントです。ファイルの内容をプレビューするときに使います。

import

import { FileViewer } from 'smarthr-ui'

Props

Props 名 デフォルト値 必須 説明
file FileForViewer - -
width number - - -
scaleSteps number[] - - -
scaleStep number - - -
onPassword OnPassword - - -
onLoadError () => void - - -

実装ルール

FileViewer に直接関連する eslint-plugin-smarthr のルールは現時点ではありません。

使い方チェックリスト

モバイル

  • [should] FileViewer をダイアログで表示する際は、画面いっぱいに広げる拡大したダイアログの使用を検討する