Dialog

モーダルダイアログとアラートダイアログ。フォーカス管理、Escape キーやスクリムのクリックによる閉じる操作に対応します。

対応フレームワーク
  • Angular: 対応
  • Vue: 対応
  • React: 対応
  • React Native: 対応

使い方

インポート

ts
import {
  SoneAlertDialogComponent,
  SoneDialogCloseComponent,
  SoneDialogComponent,
  SoneDialogDescriptionDirective,
  SoneDialogFooterDirective,
  SoneDialogHeaderDirective,
  SoneDialogMediaDirective,
  SoneDialogTitleDirective,
} from "@surface-one/angular/dialog";

API リファレンス

SoneAlertDialogComponentコンポーネント

セレクター
sone-alert-dialog
入力
名前型 デフォルト
open双方向

Shown or not, two-way: `[(open)]`. Leave it unbound to show the overlay while it is mounted (render it with `@if` and close it on `(dismiss)`).

boolean | undefinedundefined
dismissiblebooleantrue
showClosebooleantrue
closeLabel—$localize`:verb|Closes a dialog or sheet:Close`
ariaLabelstring | nullnull
size"xs" | "md""md"
出力
名前型
dismissvoid

SoneDialogCloseComponentコンポーネント

`button[soneDialogClose]` — a close button for a dialog or sheet header. Inside an overlay it closes it (when it may be dismissed) and the corner close steps aside. Project your own glyph to replace the default cross.

セレクター
button[soneDialogClose], button[soneSheetClose], button[soneDrawerClose]
入力
名前型 デフォルト
label—$localize`:verb|Closes a dialog or sheet:Close`

SoneDialogComponentコンポーネント

セレクター
sone-dialog
入力
名前型 デフォルト
open双方向

Shown or not, two-way: `[(open)]`. Leave it unbound to show the overlay while it is mounted (render it with `@if` and close it on `(dismiss)`).

boolean | undefinedundefined
dismissiblebooleantrue
showClosebooleantrue
closeLabel—$localize`:verb|Closes a dialog or sheet:Close`
ariaLabelstring | nullnull
sizeDialogSize"sm"
scrimClosesbooleantrue
出力
名前型
dismissvoid

SoneDialogDescriptionDirectiveディレクティブ

セレクター
[soneDialogDescription], [soneSheetDescription], [soneDrawerDescription]
入力
名前型 デフォルト
idstringsoneId("sone-dialog-description")

SoneDialogFooterDirectiveディレクティブ

セレクター
[soneDialogFooter], [soneSheetFooter], [soneDrawerFooter]

SoneDialogHeaderDirectiveディレクティブ

セレクター
[soneDialogHeader], [soneSheetHeader], [soneDrawerHeader]

SoneDialogMediaDirectiveディレクティブ

セレクター
[soneDialogMedia], [soneSheetMedia], [soneDrawerMedia]
入力
名前型 デフォルト
toneDialogMediaTone"default"

SoneDialogTitleDirectiveディレクティブ

セレクター
[soneDialogTitle], [soneSheetTitle], [soneDrawerTitle]
入力
名前型 デフォルト
idstringsoneId("sone-dialog-title")