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() @HostBinding() open: boolean = false
@Input() side: DaffSidebarSide = 'left'
@Input() mode: DaffSidebarMode = 'side'
@Input() @HostBinding() toggled: boolean = false
@Output() escapePressed: EventEmitter<void> = new EventEmitter<void>()
reveal(): void
hide(): void
toggle(): void
}
boolean| Default | false |
|---|---|
| Description | Controls whether the component is open. |
DaffSidebarSide| Default | 'left' |
|---|---|
| Description | What side of the viewport to show the sidebar on. |
DaffSidebarMode| Default | 'side' |
|---|---|
| Description | The mode of the sidebar. |
boolean| Default | – |
|---|---|
| Description | Controls whether the component is open. |
EventEmitter| Default | – |
|---|---|
| Description | Event fired when |
voidReveal the contents of the sidebar.
voidHide the contents of the sidebar.
voidToggle the visibility of the sidebar.