GitHub

DaffSidebarComponent

import { DaffSidebarComponent } from '@daffodil/design/sidebar'

DaffSidebarComponent is heavily based upon the work done by the @angular/components team on mat-drawer and mat-sidenav. It's intended to be a simplified version (with a different design) of mat-drawer.

<daff-sidebar></daff-sidebar>
@Component()
class DaffSidebarComponent implements DaffOpenable {
  @Input() side: DaffSidebarSide = 'left'
  @Input() mode: DaffSidebarMode = 'side'

  @Output() escapePressed: EventEmitter<void> = new EventEmitter<void>()

  reveal(): void
  hide(): void
  toggle(): void
}

() Methods

reveal
void

Reveal the contents of the sidebar.

hide
void

Hide the contents of the sidebar.

toggle
void

Toggle the visibility of the sidebar.

Inputs

side
DaffSidebarSide
Default'left'
Description

What side of the viewport to show the sidebar on.

mode
DaffSidebarMode
Default'side'
Description

The mode of the sidebar.

Outputs

escapePressed
EventEmitter<void>
Default
Description

Event fired when ESC key is pressed when the sidebar has focus.