2.0.1 • Published 4 years ago

ng-peek-behind v2.0.1

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

NgPeekBehind

Utility directive to peek behind overlay panels and dialogs.

Usage

<div class="cdk-overlay-pane dialog">
	<!--Nested inside-->
	<button
		[libPeekBehind]="'cdk-overlay-pane'"
		[libPeekBehindTrigger]="showPanel"
	>
	</button>
</div>

Setting showPanel = false will fade away the dialog and showPanel = true will fade it in.

Inputs

InputTypeValueDefault
libPeekBehindstringClass to identify parent overlay dialog.'cdk-overlay-dialog'
libPeekBehindTriggerbooleanThis input triggers the fade in/out transitions. true will fade in the dialog. false will fade out the dialog.-

Fallback directive

libPeekBehind directive uses Angular's Animations and AnimationBuilder under the hood. In case you are not happy with the responsiveness, consider using libPeekBehindListener which relies on @HostListeners to do the job.

In libPeekBehindListener, the peeker will listen for mousedown event on the attached element to fade out and document:mouseup event to fade in, custom trigger cannot be configured -

Inputs

InputTypeValueDefault
libPeekBehindListenerstringClass to identify parent overlay dialog.'cdk-overlay-dialog'

Usage

<div class="cdk-overlay-pane dialog">
	<!--Nested inside-->
	<button
		[libPeekBehindListener]="'cdk-overlay-pane'"
	>
	</button>
</div>
2.0.1

4 years ago

2.0.0

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago