Skip to main content
Designkufu

smarthr-ui-action-dialog

ActionDialogは、ユーザーに確認や単純な操作を求めるためのダイアログコンポーネントです。フォーム要素を含まない確認・実行のダイアログを表示するときに使います。

Stars
30
Source
kufu/smarthr-design-system
Updated
2026-05-29
Slug
kufu--smarthr-design-system--smarthr-ui-action-dialog
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-action-dialog/SKILL.md -o .claude/skills/smarthr-ui-action-dialog.md

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

ユーザーに確認や単純な操作を求めるためのダイアログコンポーネントです。フォーム要素を含まない確認・実行のダイアログを表示するときに使います。

モーダルなダイアログです。ダイアログの表示中、ダイアログの裏側の領域はスクリム(幕)で隠され、操作を受け付けません。

import

import { ActionDialog } from 'smarthr-ui'

Props

Props 名 デフォルト値 必須 説明
size "XS" | "S" | "M" | "L" | "XL" | "XXL" | "FULL" - - ダイアログの大きさ
width string | number - - @deprecated ダイアログの幅を指定する場合は、width ではなく size を使用してください。 ダイアログの幅
className string - - -
heading ReactNode | ObjectHeadingType - -
closeButton ReactNode | { text: ReactNode; disabled?: boolean; } - - -
subActionArea ReactNode - - ダイアログフッターの左端操作領域
responseStatus ResponseStatus - - -
firstFocusTarget RefObject - - ダイアログを開いた時にフォーカスする対象
onClickOverlay () => void - - オーバーレイをクリックした時に発火するコールバック関数
onPressEscape (() => void) & ((close: () => void) => void) - - エスケープキーを押下した時に発火するコールバック関数
ariaLabel string - - ダイアログの aria-label
ariaLabelledby string - - ダイアログの aria-labelledby
portalParent HTMLElement | RefObject - - DOM 上でダイアログの要素を追加する親要素
contentBgColor "BACKGROUND" | "COLUMN" | "BASE_GREY" | "OVER_BACKGROUND" | "HEAD" | ... 他8個 - - -
contentPadding Gap | { block?: Gap; inline?: Gap; } - - -
actionButton ReactNode | { text: ReactNode; theme?: "primary" | "danger" | "secondary"; disabled?: boolean; } - -
onClickAction (e: MouseEvent<Element, MouseEvent>, helpers: ActionDialogHelpers) => void - アクションボタンをクリックした時に発火するコールバック関数 @param e マウスイベント @param helpers ダイアログ操作のためのヘルパー関数
onClickClose (close: () => void) => void - - -
onToggle (isOpen: boolean) => void - - -
onOpen () => void - - -
onClose () => void - - -

実装ルール

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

使い方チェックリスト

使用上の注意 > ダイアログを乱用しない

  • [should] ダイアログとして表示する・操作させるべき内容なのか慎重にユースケースを定義し、使用を検討する

使用上の注意 > 複数のモーダルダイアログを同時に表示しない (via MultipleModalWarning.mdx)

  • [avoid] モーダルダイアログを 1 つの操作で複数個表示したり、モーダルダイアログ上の操作によって 2 つ目のモーダルダイアログを表示したりしない