Dialog

Diálogos modales y diálogos de alerta con gestión del foco y cierre con Escape o al pulsar el fondo.

Disponible en
  • Angular: disponible
  • Vue: disponible
  • React: disponible
  • React Native: disponible

Uso

Importación

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

Referencia de la API

SoneAlertDialogComponentComponente

Selector
sone-alert-dialog
Inputs
NombreTipo Predeterminado
openbidireccional

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"
Outputs
NombreTipo
dismissvoid

SoneDialogCloseComponentComponente

`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.

Selector
button[soneDialogClose], button[soneSheetClose], button[soneDrawerClose]
Inputs
NombreTipo Predeterminado
label—$localize`:verb|Closes a dialog or sheet:Close`

SoneDialogComponentComponente

Selector
sone-dialog
Inputs
NombreTipo Predeterminado
openbidireccional

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
Outputs
NombreTipo
dismissvoid

SoneDialogDescriptionDirectiveDirectiva

Selector
[soneDialogDescription], [soneSheetDescription], [soneDrawerDescription]
Inputs
NombreTipo Predeterminado
idstringsoneId("sone-dialog-description")

SoneDialogFooterDirectiveDirectiva

Selector
[soneDialogFooter], [soneSheetFooter], [soneDrawerFooter]

SoneDialogHeaderDirectiveDirectiva

Selector
[soneDialogHeader], [soneSheetHeader], [soneDrawerHeader]

SoneDialogMediaDirectiveDirectiva

Selector
[soneDialogMedia], [soneSheetMedia], [soneDrawerMedia]
Inputs
NombreTipo Predeterminado
toneDialogMediaTone"default"

SoneDialogTitleDirectiveDirectiva

Selector
[soneDialogTitle], [soneSheetTitle], [soneDrawerTitle]
Inputs
NombreTipo Predeterminado
idstringsoneId("sone-dialog-title")