Menu is a small floating panel used to display a list of actions or navigational items.
import { DaffMenuComponent } from '@daffodil/design/menu'
@Component()
class DaffMenuComponent implements AfterContentInit, AfterViewInit {
@HostBinding() class: boolean = true
@HostBinding() tabindex: number = 0
@HostBinding() role: string = 'menu'
ngAfterContentInit(): void
ngAfterViewInit(): void
}
void
void
import { DaffMenuItemComponent } from '@daffodil/design/menu'
@Component()
class DaffMenuItemComponent {}
import { DaffMenuActivatorDirective } from '@daffodil/design/menu'
@Directive()
class DaffMenuActivatorDirective implements OnDestroy {
@HostBinding()
get openClass(): boolean
@Input() daffMenuActivator: TemplateRef<unknown> | Type<unknown>
ngOnDestroy(): void
focus(): void
@HostListener() openMenu(event): void
}
void
void
void
Parameter | event: undefined |
---|---|
Description |
TemplateRef | Type
Default | – |
---|---|
Description |
import { DaffMenuService } from '@daffodil/design/menu'
@Injectable()
class DaffMenuService {
protected _overlay: OverlayRef
open$: Observable<boolean> = this.$_open.asObservable()
protected overlay: Overlay
protected _createOverlay(
activatorElement: ViewContainerRef
component: DaffMenuSlot
): Promise<void>
protected _destroyOverlay(): void
close(): void
open(
activator: ViewContainerRef
component: DaffMenuSlot
): void
}
Promise<void>
Parameter | activatorElement: ViewContainerRef |
---|---|
Description |
Parameter | component: DaffMenuSlot |
---|---|
Description |
void
void
void
Parameter | activator: ViewContainerRef |
---|---|
Description |
Parameter | component: DaffMenuSlot |
---|---|
Description |
import { DaffMenuModule } from '@daffodil/design/menu'
@NgModule()
class DaffMenuModule {}
import { daffMenuCreateOverlay } from '@daffodil/design/menu'
function daffMenuCreateOverlay(
overlay: Overlay
element: ElementRef<any>
config: OverlayConfig = {}
): OverlayRef