2.4.3 • Published 5 months ago

@saekitominaga/customelements-portal v2.4.3

Weekly downloads
10
License
MIT
Repository
github
Last release
5 months ago

Animated motion <portal> by custom elements

npm version test status

Demo

Examples

<x-portal-animation
  src="foo.html"
  referrerpolicy="origin">
</x-portal-animation>

Attributes

e.g. <x-portal-animation src="https://example.com/" referrerpolicy="same-origin"></x-portal-animation>

Style customization (CSS custom properties)

namedeaultDescription
--portal-width640pxWidth of portal
--portal-height360pxHeight of portal
--portal-max-width100%Maximum width of portal
--portal-max-height100vhMaximum height of portal
--portal-border-stylesolidBorder style of portal (border-style property)
--portal-border-width1pxBorder width of portal (border-width property)
--portal-border-colorcurrentColorBorder color of portal (border-color property)
--portal-scale0.5Amount of scaling of portal (The value of the scale() in the transform property)
--portal-animation-duration0.5sTime a transition animation (transition-duration property)
--portal-outline-stylesolidOutline style of portal (outline-style property)
--portal-outline-width1pxOutline width of portal (outline-width property)
--portal-outline-colorcurrentColorOutline color of portal (outline-color property)
--portal-outline-offset0pxOutline offset of portal (outline-offset property)
  • * Specify a value greater than 0, because setting --portal-animation-duration to '0s' disables the detection of 'transitionend' events.

⚠ Precautions for use

As of October 2022, there is no officially supported browser for the <portal> element (Can I use...). Chrome is supported with chrome://flags/#enable-portals enabled.

2.4.3

5 months ago

2.4.2

5 months ago

2.4.1

2 years ago

2.3.2

2 years ago

2.4.0

2 years ago

2.3.1

2 years ago

2.3.0

3 years ago

2.2.0

3 years ago

2.1.1

3 years ago

2.1.0

3 years ago

2.0.3

3 years ago

2.0.2

3 years ago

2.0.1

3 years ago

2.0.0

3 years ago

1.2.2

4 years ago

1.2.1

4 years ago

1.0.1

4 years ago