1.1.1 • Published 4 years ago

afix-dialog v1.1.1

Weekly downloads
1
License
MIT
Repository
-
Last release
4 years ago

Dialog

A Web Component for presenting a modal dialog

Using it

Try it out directly (requires a modern browser)

import "https://cdn.skypack.dev/afix-dialog@latest";

Or install with

npm install afix-dialog

And use like this

import "afix-dialog"`

Attributes

NameDescriptionDefault
openWhether or not the dialog is visibleUnset
forThe ID of a button to be opened byUnset

Slots

NameDescriptionDefault
contentThe contents of the dialogUnset

DialogElement

Methods

show(): void

Shows the dialog

close(): void

Hides the dialog

Events

close

Emitted when the dialog is closed

open

Emitted when the dialog is opened

CSS Custom Properties

Remember all custom properties are prefixed with the component name. e.g. background-color is --afix-dialog-background-color.

NameDescriptionDefault
background-colorThe background of the dialogrgba(0, 0, 0, 0.75)
transition-durationThe amount of time the in/out transition takes150ms
transition-easingThe easing function used when showing the dialogcubic-bezier(0.61, 1, 0.88, 1)
1.1.1

4 years ago

1.0.2

4 years ago

1.1.0

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago