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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@teenageinterface/select

v0.1.2

Published

The `Select` component is a customizable dropdown component that allows single or multiple selections. It supports dynamic options, keyboard navigation, and adaptive dropdown positioning.

Readme

Select Component

The Select component is a customizable dropdown component that allows single or multiple selections. It supports dynamic options, keyboard navigation, and adaptive dropdown positioning.

Installation

Ensure that you have installed the @teenageinterface/select library in your Angular project. If not, you can add it using:

npm install @teenageinterface/select

Usage

Import the SelectComponent into your Angular application:

import { SelectComponent } from '@teenageinterface/select';

@Component({
  selector: 'app-select-example',
  template: `
    <tiSelect 
      [options]="options" 
      [placeholder]="'Choose an option'" 
      [multiSelect]="true" 
      [selectedIds]="selectedValues" 
      (selectionChange)="onSelectionChange($event)">
    </tiSelect>
  `,
})
export class SelectExampleComponent {
  options = [
    { value: 1, title: 'Option 1' },
    { value: 2, title: 'Option 2' },
    { value: 3, title: 'Option 3' },
  ];
  selectedValues: (string | number)[] = [1];

  onSelectionChange(selected: { value: string | number; title: string }[]) {
    console.log('Selected options:', selected);
  }
}

Example

<tiSelect 
  [options]="options" 
  [placeholder]="'Select an option'" 
  [multiSelect]="false" 
  [selectedIds]="selectedValues" 
  (selectionChange)="handleSelectionChange($event)">
</tiSelect>

Properties

| Property | Type | Default | Description | |----------------|---------------------------------------------|------------------------|---------------------------------------------------------------------------| | options | { value: string \| number; title: string }[] | [] | The list of options available in the dropdown. | | placeholder | string | 'Select an option' | The placeholder text when no option is selected. | | multiSelect | boolean | false | Allows multiple selections when set to true. | | selectedIds | (string \| number)[] | [] | The IDs of the currently selected options. |

Events

| Event | Description | |--------------------|-----------------------------------------------------------------------------| | selectionChange | Emits an array of selected options when the selection changes. |

Features

Adaptive Dropdown Positioning

The dropdown adjusts its position (top or bottom) based on the available space in the viewport.

Keyboard Navigation

  • ArrowDown: Moves to the next option.
  • ArrowUp: Moves to the previous option.
  • Enter: Selects the highlighted option.
  • Escape: Closes the dropdown.

Documentation

For more information, visit the official documentation.

Repository

The source code is available on GitHub.

License

This project is licensed under the MIT License.