2.46.0 • Published 8 months ago

@vonage/vwc-dropdown v2.46.0

Weekly downloads
-
License
ISC
Repository
github
Last release
8 months ago

vwc-dropdown

vwc-dropdown is a surfacing content component, dropdown, showing up on demand, eg upon user action. vwc-dropdown, in contrast to vwc-menu, allows a free content provided by consumer, while structuring the internal body with slots: header, footer and the default content.

Usage

Usage example:

<vwc-menu>
	<vwc-textfield slot="header">Item 1</vwc-textfield>
	<div>
		any HTML content can go here as main body
	</div>
	<vwc-button slot="footer">Done</vwc-button>
</vwc-menu>

Initiate vwc-dropdown to be available in your component/application:

import '@vonage/vwc-dropdown';

//	or, to be able to use casting in TypeScript, do

import { VWCDropdown } from '@vonage/vwc-dropdown';

API

vwc-dropdown exposes several APIs to provide its fuctionality, namely properties, methods and events.

Properties

PropertyModifiersTypeDescription
absoluteboolean
activatableboolean
anchorHTMLElement \| null
corner"TOP_LEFT" \| "TOP_RIGHT" \| "BOTTOM_LEFT" \| "BOTTOM_RIGHT" \| "TOP_START" \| "TOP_END" \| "BOTTOM_START" \| "BOTTOM_END"
defaultFocus"NONE" \| "LIST_ROOT" \| "FIRST_ITEM" \| "LAST_ITEM"
fixedboolean
forceGroupSelectionboolean
fullwidthboolean
indexreadonlyMWCListIndex
innerRole"menu" \| "listbox"
itemsreadonlyListItemBase[]
menuCornerMenuCorner
multiboolean
openboolean
quickboolean
selectedreadonlyListItemBase \| ListItemBase[] \| null
slotElementHTMLSlotElement \| null
wrapFocusboolean
xnumber \| null
ynumber \| null

Methods

MethodType
close(): void
focusItemAtIndex(index: number): void
getFocusedItemIndex(): number
layout(updateItems?: boolean \| undefined): void
select(index: MWCListIndex): void
show(): void

Events

EventDescription
action{ActionDetail}
closed
opened
selected{SelectedDetail}
2.46.0

8 months ago

2.45.0

1 year ago

2.43.0

2 years ago

2.43.2

2 years ago

2.43.1

2 years ago

2.44.0

2 years ago

2.41.0

2 years ago

2.42.0

2 years ago

2.38.0

2 years ago

2.39.1

2 years ago

2.39.0

2 years ago

2.37.2

2 years ago

2.40.0

2 years ago

2.36.3

3 years ago

2.36.2

3 years ago

2.37.0

3 years ago

2.36.0

3 years ago

2.36.1

3 years ago

2.35.0

3 years ago

2.32.0

3 years ago

2.34.0

3 years ago

2.34.1

3 years ago

2.31.0

3 years ago

2.33.1

3 years ago

2.33.0

3 years ago

2.29.0

3 years ago

2.28.1

3 years ago

2.28.0

3 years ago

2.28.2

3 years ago

2.30.2

3 years ago

2.30.1

3 years ago

2.30.3

3 years ago

2.30.0

3 years ago

2.27.1

3 years ago

2.27.0

3 years ago

2.26.0

3 years ago

2.25.10

3 years ago

2.25.9

3 years ago

2.25.8

3 years ago

2.25.7

3 years ago

2.25.6

3 years ago

2.25.5

3 years ago

2.25.3

3 years ago

2.25.2

3 years ago

2.25.1

3 years ago

2.25.0

3 years ago

2.24.1

3 years ago

2.24.0

3 years ago

2.23.0

4 years ago

2.22.1

4 years ago

2.22.0

4 years ago

2.21.1

4 years ago

2.21.0

4 years ago

2.20.1

4 years ago

2.20.0

4 years ago

2.19.0

4 years ago

2.18.1

4 years ago

2.18.0

4 years ago

2.17.0

4 years ago

2.16.1

4 years ago

2.16.0

4 years ago

2.15.0

4 years ago

2.14.0

4 years ago

2.13.0

4 years ago

2.12.0

4 years ago

2.11.0

4 years ago

2.10.0

4 years ago