New: Headless Commerce with Remix! read more

DropdownComponent

DropdownComponent

Used for building dropdown menus.

Example

<vdr-dropdown>
  <button class="btn btn-outline" vdrDropdownTrigger>
      <clr-icon shape="plus"></clr-icon>
      Select type
  </button>
  <vdr-dropdown-menu vdrPosition="bottom-left">
    <button
      *ngFor="let typeName of allTypes"
      type="button"
      vdrDropdownItem
      (click)="selectType(typeName)"
    >
      typeName
    </button>
  </vdr-dropdown-menu>
</vdr-dropdown>

Signature

class DropdownComponent {
  public public trigger: ElementRef;
  @Input() manualToggle = false;
  onClick() => ;
  toggleOpen() => ;
  onOpenChange(callback: (isOpen: boolean) => void) => ;
  setTriggerElement(elementRef: ElementRef) => ;
}

Members

trigger

public property
type:
ElementRef

manualToggle

property
type:

onClick

method
type:
() =>

toggleOpen

method
type:
() =>

onOpenChange

method
type:
(callback: (isOpen: boolean) => void) =>

setTriggerElement

method
type:
(elementRef: ElementRef) =>