Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Sidebar/Flyout/Sidenav Component For Angular 6 and Greater

License

NotificationsYou must be signed in to change notification settings

jspanchal/ngx-flyout

Repository files navigation

demo

NPM

No Drama Sidebar/Flyout/Sidenav Component For Angular 6 and greater.

Installation

npm i ngx-flyout --save

Changelog

See thereleases page on GitHub.

Usage

AddFlyoutModule to your app module:

import{FlyoutModule}from'ngx-flyout';@NgModule({declarations:[AppComponent],imports:[BrowserModule,FlyoutModule],bootstrap:[AppComponent],})classAppModule{}

In your app component, simply use add a<ngx-flyout> wrapper, then place the content you want in your flyout within it.

@Component({selector:'app',template:`    <!-- Container for sidebar(s) + page content -->    <ngx-flyout [(open)]="openFlyout">        <ul>            <li>Menu 1</li>            <li>Menu 2</li>            <li>Menu 3</li>        </ul>    </ngx-flyout>    <button (click)="toggleSidebar">        Toggle Flyout    </button>  `})classAppComponent{privateopenFlyout:boolean=false;privatetoggleSidebar(){this.openFlyout=!this.openFlyout;}}

Options

Inputs

Property nameTypeDefaultDescription
openbooleanfalseControls the open state of the flyout. This should be two-way bound.
position'left','right','top','bottom''right'What side the flyout should open.
showCloseButtonshowCloseButton: booleantrueControls visibility of close button.
flyoutClassesflyoutClasses: string[]Additional styling classes for flyout.
showBackdropshowBackdrop: booleantrueControls visiblity of backdrop.
hideOnBackdropClickhideOnBackdropClick: booleantrueIf clicking on backdrop closes the flyout or not.
backdropClassesbackdropClasses: string[]Additional styling classes for backdrop

Outputs

Property nameCallback argumentsDescription
flyoutOpenedEmitted when flyout is opened.
flyoutClosedEmitted when flyout is closed.
openChangeopen: booleanEmitted whenopen is modified. This allows to do "two-way binding"

About

Sidebar/Flyout/Sidenav Component For Angular 6 and Greater

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors2

  •  
  •  

[8]ページ先頭

©2009-2025 Movatter.jp