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

ngx-ggist

v1.2.5

Published

Package for embedding and configuring GitHub Gists within Angular 13 apps

Readme

Demo Stackblitz License

Add a GitHub gist to your angular 13 project in an instant.


Table of Contents

Installation

Install with NPM

npm install ngx-ggist

If you get dependency errors, as a temporary solution you can force the installation:

npm install -f ngx-ggist

Usage

Import NgxGgistModule in your app

import { NgxGgistModule } from 'ngx-ggist';

@NgModule({
  imports: [
    NgxGgistModule
  ],
  ...
})
export class AppModule { }

Use Github Gist directive

Place the component anywhere in your template to display the gist.

<ngx-ggist></ngx-ggist>

Custom Properties

When you add the component to your project (as shown above), you will get the Hello world version of it. That's cool but, to show your own gists, you need to provide a couple of options to the component.

You will need just two properties: your user name and the script id: you can get both from the url of the GitHub gist, or when you copy the script for embedding the gist.

Optionally, you could also provide width, height, and a cool feature to highlight lines.

There are more configurations available, optional.

| Name | Type | Description | |-|-|-| | user | string | Your GitHub user | scriptId | string | The script id of your gist, usually the last parameter in the URL. (i.e. 4171e2f2b5ea64bdf974d6d2e5683cce) | | width | string | A string to define the width of the gist container; default: 600px (i.e. '100%') | | height | string | A string to define the height of the gist container; default: inherit (i.e. '400px') | | lines | array of number | An array of numbers. Each number represents a line in your gist file and that line will be highlighted; none are highlighted by default.(i.e. [1, 2, 3])|

More examples

Example below, will display the gist 417...cce, on a 400px height container, highlighting lines 1, 2, 3.

<ngx-ggist
  user="jocelo"
  scriptId="4171e2f2b5ea64bdf974d6d2e5683cce"
  height="400px"
  [lines]="[1,2,3]" >
</ngx-ggist>

Author

Alfredo Alonso