npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

flk-dropdown-list

v1.0.26

Published

Dropdown list for Falak framework

Readme

Dropdown lists

A component to display dropdown lists selections for Falak JS framework.

Installation

flk install flk-dropdown-list

Usage

hello-world.component.html

<flk-dropdown-list name="countryId" [value]="this.currentCountry.id" placeholder="Search for country" heading="Country" [items]="this.countriesList"></flk-dropdown-list>

Basically this component replaces the select tag as it offers much much features than the basic tag.

Configurations

The dropdown list component located in form.dropdown location.

General attributes

List of general attributes.

heading

name: heading | [heading]

Set the heading text, i.e user, group

If the multiple flag is set to true, the component will automatically pluralize the heading, i.e if user selects one group it will display 1 group, if selected another group it will display 2 groups and so on.

limit

name: limit | [limit]

default: 0

Configuration key: limit

Set the limit of displayed items of the performed search, default to display all.

theme

name: theme | [theme]

Available values: white | white-transparent | dark | dark-transparent

default: white

Configuration key: theme

Set the dropdown theme.

Imagable items

name: [imageable]

default: false.

If set to true, the image will be displayed before the list item.

Make sure the item object has an image key for the image path.

Items Exceptions

name: [except]

default: []

Pass list of values to be not displayed in the items list.

The [except] attribute accepts only arrays.

Dropdown position

name: position | [position]

default: bottom.

Available values: bottom | top

Set the position of the opened dropdown list.

Using lazy loading

name: [lazy-loading]

default: false.

You must declare this attribute to be true if you're going to get the data from a service.

Service

name: [service]

default: null.

Set the service object that will grab the dropdown list.

Service method

name: [service-method]

default: list.

Configuration key: serviceMethod

Set the method that will be used from the service to list the items.

Close on select

name: [close-on-select]

default: true if single selection, false if multiple selection.

Close the dropdown when user selects an option.

Close on select

name: [close-on-select]

default: true if single selection, false if multiple selection.

Close the dropdown when user selects an option.

Input attributes

name

name: name | [name]

required: false but Recommended

Set the input name.

placeholder

name: placeholder | [placeholder]

Set the search input placeholder.

required

name: required | [required]

default: false

If set to true, the user MUST select a value.

Multiple values

name: [multiple]

default: false

If set to true, user can select multiple items.

value

name: value | [value]

Set the selected value of the input.

if the dropdown is multiple selections, then the value MUST BE in array.

label

name: label | [label]

Set the dropdown label.

Events

name: select

Triggered when user selects an item.

The selected item object is passed to the event.

Mapping items

name: map

Triggered before items are rendered to map the item structure.

Usually this event is used with api responses.

hello-world.component.html

<flk-dropdown-list name="countries" [lazy-loading]="true" [service]="this.countriesService" [imageable]="true" (map)="return this.mapCountry(e)"/></flk-dropdown-list>

hello-world.component.js

class HelloWorld {
    /**
     * Map the country option to match the item schema of the dropdown list component
     * 
     * @param   {object} country
     * @returns object
     */ 
    mapCountry(country) {
        return {
            text: country.name,
            value: country.id,
            image: country.flag, // if there is a country image
        };
    }
}