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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@kinect-pro/ngp-radial-menu

v2.0.1

Published

A radial menu with a variety of settings for Angular app

Downloads

8

Readme

Angular2 Radial Menu

This project for Angular 2 (currently supported version 9) is a menu with the ability to customize animations and styles. Demo project here

|Library version|npm tag|Angular version| |---|:---:|:---:| |1.x|ng8|Angular 8| |2.x|ng9|Angular 9|

Features

Adding your own template

To create a radial menu, you must pass your template to the component. Elements can be an icon, text, component... Any item may contain subitems. The number of subitems is not limited.

Using combined elements

You can combine different elements in one point (for example, an icon and a signature)

Custom styles

You can customize styles to display elements. You can customize "menu-item" class for main items and "sub-item" class for subitems.

Custom animation

You can customize the duration, delay and animation type.

Installation

How to install

With npm

npm install @kinect-pro/ngp-radial-menu

With yarn

yarn add @kinect-pro/ngp-radial-menu

How to setup

Add MenuModule to need module

app.module
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AppComponent } from './app.component';

import {MenuModule} from '@kinect-pro/ngp-radial-menu';


@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    MenuModule
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }

Add carousel component to need component

app.component.html
<ngp-radial-menu class="menu-container">
  // Your template must be here
</ngp-radial-menu>

Development server

Run ng serve for a dev server. Navigate to http://localhost:4200/. The app will automatically reload if you change any of the source files.

Using

Set template to radial menu

Using custom elements

app.component.html
<ngp-radial-menu class="menu-container">
    <a class="menu-item" ngpMenuItem>
        <fa-icon [icon]="faAddressCard"></fa-icon>
    </a>
    <a class="menu-item" ngpMenuItem>
        <fa-icon [icon]="faAddressCard"></fa-icon>
    </a>
    <a class="menu-item" ngpMenuItem>
        <fa-icon [icon]="faAddressCard"></fa-icon>
    </a>
</ngp-radial-menu>
Note: all of menu items must contain ngpMenuItem directive for the correct working.
Note: in the 'menu-container' class, block sizes and custom styles are specified

Set custom options

  • isOpenByHover: determines whether to open a menu item on mouseover or not.
  • isSymmetrical: determines whether or not the arrangement of elements in the menu is symmetric.
  • isClockwiseMovement: determines whether the elements are clockwise or not.
  • mainRadius: determines the radius of the elements of the main menu.
  • mainRadius: determines the radius of the elements of the submenu.
  • animateTime: animation time.
  • animatePause: pause time between animations.
  • mainStep: step between main menu items.
  • subStep: step between submenu items.
  • startedDeg: menu start degree (180 degrees is the location of the 12 hour hand).
  • animateName: animation name. Must be 'come-in', 'fade-in', 'spin', 'duration-and-fade-in', 'duration-and-come-in'.
  • animationType: animation type. Must be 'ease-in', 'ease-out', 'ease-in-out' or valid 'cubic-bezier()'. You can create valid curve in generator here. Default value is 'ease-out'.
app.component.html
<ngp-radial-menu [menuConfig]="menuConfig" class="menu-container">
  // template here
</ngp-radial-menu>
app.component.ts
  menuConfig = {
    isOpenByHover: false,
    isSymmetrical: true,
    isClockwiseMovement: true,
    mainRadius: 200,
    subRadius: 140,
    animateTime: 200,
    animatePause: 200,
    subStep: 75,
    mainStep: 150,
    startedDeg: 180,
    animateName: 'fade-in',
    animationType: 'ease-out'
  };

Contact us