Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@revolist/revo-dropdown

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@revolist/revo-dropdown

Minimalistic dropdown with keyboard support and search

  • 1.0.4
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.2K
decreased by-10.17%
Maintainers
1
Weekly downloads
 
Created
Source

revo-dropdown

Minimalistic dropdown webcomponent. After long search we couldn't find any cross platform and had to build our own inspired by the latest trends.

Autocomplete

Regular select

Autocomplete dropdownRegular dropdown

Getting Started

To start building a new web component using Stencil, clone this repo to a new directory:

git clone https://github.com/revolist/revodropdown.git revo-dropdown
cd revo-dropdown
git remote rm origin

and run:

npm install
npm start

To build the component for production, run:

npm run build

To run the unit tests for the components, run:

npm test

Need help? Check out docs here.

Script tag

  • Put a script tag similar to this <script src='https://unpkg.com/revo-dropdown@latest/dist/revo-dropdown.js'></script> in the head of your index.html
  • Then you can use the element anywhere in your template, JSX, html etc

API

Properties

PropertyAttributeDescriptionTypeDefault
appendToappend-toWhere to append element"body" | "current"'body'
autoCloseauto-closeShould dropdown autoclose on changeValuebooleantrue
dataIddata-idDefine object mapping for id/valuestringundefined
dataLabeldata-labelDefine object mapping for labelsstringundefined
filterfilterFilter criteria"contains" | "start"'contains'
hasFilterhas-filterbooleantrue
placeholderplaceholderPlaceholder textstring'Select'
source--Define object mapping for id/valueany[]undefined
valuevalueSelected valueanyundefined

Events

EventDescriptionType
changeValueWhen value changedCustomEvent<{ val: any; originalEvent?: MouseEvent; }>
closeBefore element close, can be preventedCustomEvent<any>
openBefore element open, can be preventedCustomEvent<any>

Methods

doChange(val: any, originalEvent?: MouseEvent) => Promise<void>

Change value

Returns

Type: Promise<void>

doClose() => Promise<void>

Close dropdown

Returns

Type: Promise<void>

doOpen() => Promise<void>

Open dropdown

Returns

Type: Promise<void>

Dependencies

Depends on

Graph

graph TD;
  revo-dropdown --> revo-list
  style revo-dropdown fill:#f9f,stroke:#333,stroke-width:4px

Built with StencilJS

Keywords

FAQs

Package last updated on 23 Nov 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc