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

@tagazok/algolia-angular-components

v1.0.4

Published

A component library for Algolia

Downloads

8

Readme

Algolia components library for Angular

Library of components for Algolia on angular.

So :

  • Components may change, appear from nowhere or disapear in a black hole (it happens)
  • Documentation may not be accurate and no up to date

Installation

npm install -save @tagazok/algolia-angular-components

Usage

Import the AlgoliaModule and the AlgoliaService in your app

import { AlgoliaModule, AlgoliaService } from '@tagazok/algolia-angular-components'

Load the module into your app passing

@NgModule({
  ...,
  imports: [
    AlgoliaModule.forRoot({appId: 'YOUR_APP_ID', apiKey: 'YOUR_APP_KEY'}),
  ],
  ...
})
export class AppModule { }

You are now ready to use the components in your app \o/

List of components

Search

Displays a search bar that triggers a live search

<app-algolia-search [index]="'ikea'" [hitsPerPage]="16" [placeHolder]="Enter text..."></app-algolia-search>

Parameters :

  • index : The algolia index
  • hitsPerPage : The maximum number of results you want the research to return (default is 12)
  • placeHolder : The placeholder of the input (default is "Search")

Results

Displays the results of your research in a custom template

<app-algolia-results>
  <template let-item="item">
    <!-- The html template of a single result item -->
  </template>
</app-algolia-result>

Facets

Displays facet and manage filters on click.

<app-algolia-facets [attribute]="'materials'"[label]="'Material'" [limit]="'10'" [selectedcssclass]="'selected-filter'">
  <template let-item="item">
     <!-- The html of a single result item -->
    <!-- ex : {{item.key}} <span class="facet-val">({{item.val}})</span> -->
    <!-- ex : <div class="facet-color" [attr.data-facet-value]="item.key">&nbsp;</div> -->
  </template>
</app-algolia-facets>

Parameters :

  • attribute : The attribute of which you want the facet
  • label : The label of the List (may be removed in future release... not sure yet)
  • limit : The maximum number of results per facets
  • selectedcssclass : The class to apply when a facet value is selected for filtering the query

Stats

Simply displays the stats of the result of the research

<app-algolia-stats></app-algolia-stats>

Sort (early WIP)

Allows you to specify how you want your result to be sorted.

<app-algolia-sort [indices]="sortIndices" [label]="'Sort by'"></app-algolia-sort>

Parameters :

  • label : The placeholder/title of the search field (will be removed in future release as md- has been removed)
  • indices : List of items to sort with. Exemple :
const sortIndices = [
      {value: 'ikea', label: 'Featured'},
      {value: 'ikea_price_asc', label: 'Price asc.'},
      {value: 'ikea_price_desc', label: 'Price desc.'}
    ];

Pagination

Add pagination to navigate in your results

<app-algolia-pagination [padding]="2"></app-algolia-pagination>

Parameters :

  • padding : See +/- n page numbers (default is 3 if not specified)

Stars

Display Stars, usefull for ratings

<app-algolia-stars [value]="3" [min]="1" [max]="5"></app-algolia-stars>

Parameters : min: The minimum value (default is 0); max: The maximum value to display empty stars value : The number of plain stars

TODO :

  • See what we can do with css customisation
  • [DONE] Better algolia-result customisation (row / card / column views)
  • manage OR request for filters.
  • In algolia-stats. Add attribute to choose which stat to display (# and time)
  • Add prev / new arrow on pagination
  • "Filter" by component
  • Automatic routes change when whanging page or filter, etc

Example

This app has been built with the components of this library with the idea of Algolia e-commerce demo app
To be published very soon on github :)

Thanks

Created using https://github.com/manekinekko/angular-library-starter