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

@kit-ng-ui/float-button

v0.1.0

Published

Kit UI FloatButton component — floating action button + back-to-top + speed-dial group.

Readme

@kit-ng-ui/float-button

Floating action button family for Kit UI. Mirrors ant-design's FloatButton, FloatButton.Group, and FloatButton.BackTop.

Install

pnpm add @kit-ng-ui/float-button @kit-ng-ui/core @kit-ng-ui/icons

Styles

Import the package's stylesheet once at the app level (alongside @kit-ng-ui/core/styles):

// app styles.scss
@use '@kit-ng-ui/core/styles' as *;
@use '@kit-ng-ui/float-button/styles' as float-button;

Namespaces must be distinct from other @kit-ng-ui/<pkg>/styles imports (Sass collapses the default namespace from the last path segment).

The components themselves carry no styleUrls — the styles are global, BEM-flat, and live in a single stylesheet so the bundle never duplicates rules.

Use

import { Component } from '@angular/core';
import {
  KitFloatButtonComponent,
  KitFloatButtonGroupComponent,
  KitBackTopComponent,
} from '@kit-ng-ui/float-button';

@Component({
  standalone: true,
  imports: [KitFloatButtonComponent, KitFloatButtonGroupComponent, KitBackTopComponent],
  template: `
    <!-- Single FAB -->
    <kit-float-button icon="plus" type="primary" floating bottom="32px" right="32px" ariaLabel="Add" />

    <!-- Speed-dial group -->
    <kit-float-button-group floating bottom="120px" right="32px" trigger="click" icon="plus">
      <kit-float-button icon="search" ariaLabel="Search" />
      <kit-float-button icon="github" ariaLabel="GitHub" />
    </kit-float-button-group>

    <!-- Back to top -->
    <kit-back-top [visibilityHeight]="600" />
  `,
})
export class Demo {}

API

<kit-float-button>

| Input | Type | Default | Description | | ------------- | -------------------------- | ----------- | ---------------------------------------------------------- | | type | 'default' \| 'primary' | 'default' | Visual variant | | shape | 'circle' \| 'square' | 'circle' | Corner radius | | icon | string \| null | null | Icon name from the registry | | description | string \| null | null | Small caption rendered under the icon | | disabled | boolean | false | Disabled state | | floating | boolean | false | Pin via position: fixed | | top | string \| null | null | CSS length (only used when floating) | | right | string \| null | null | CSS length (only used when floating) | | bottom | string \| null | null | CSS length (only used when floating) | | left | string \| null | null | CSS length (only used when floating) | | href | string \| null | null | When set, renders as an <a> instead of a <button> | | target | string \| null | null | Anchor target attribute | | rel | string \| null | null | Anchor rel attribute | | ariaLabel | string \| null | null | Required for icon-only buttons (a11y) |

| Output | Payload | Description | | --------- | ------------ | -------------------------------------------- | | clicked | MouseEvent | Fires on click. Suppressed when disabled. |

<kit-float-button-group>

Stacks child <kit-float-button> elements vertically. With [trigger], renders a primary trigger button that toggles the expanded state.

| Input | Type | Default | Description | | ----------- | ------------------------------- | ----------- | -------------------------------------------------------- | | trigger | 'click' \| 'hover' \| null | null | Toggle mode. null keeps the stack always visible. | | type | 'default' \| 'primary' | 'default' | Trigger button type | | shape | 'circle' \| 'square' | 'circle' | Trigger button shape | | icon | string | 'plus' | Icon shown on the trigger when collapsed | | closeIcon | string | 'close' | Icon shown on the trigger when expanded | | ariaLabel | string \| null | null | a11y label for the trigger | | floating | boolean | false | Pin via position: fixed | | top/right/bottom/left | string \| null | null | CSS length (only used when floating) |

<kit-back-top>

Hidden until the page scroll position passes visibilityHeight. Smooth-scrolls to the top on click.

| Input | Type | Default | Description | | ------------------ | -------------------------- | ------------- | ------------------------------------------------- | | visibilityHeight | number | 400 | Scroll threshold in px before the button appears | | smooth | boolean | true | Use behavior: 'smooth' when scrolling | | target | HTMLElement \| null | null | Scroll container to observe and scroll. Defaults to window. | | icon | string | 'chevron-up'| Icon name | | type | 'default' \| 'primary' | 'default' | Visual variant | | shape | 'circle' \| 'square' | 'circle' | Corner radius | | ariaLabel | string \| null | 'Back to top' | a11y label | | top/right/bottom/left | string \| null | null | Placement. right: 32px; bottom: 32px is applied only when none of the four are set; otherwise the component renders with the exact values you provide. |

| Output | Payload | Description | | --------- | ------- | ------------------------------------------------- | | clicked | void | Fires synchronously after scrollTo is dispatched (not when the scroll animation finishes) |

Behavior notes

  • floating toggles position: fixed; z-index: var(--kit-z-fixed). Without it, the component sits inline so it can be embedded in any layout.
  • The group's expanded state uses opacity + transform transitions — items remain in the DOM, just pointer-events: none when collapsed.
  • <kit-back-top> is SSR-safe: the scroll listener is only attached in the browser. Pre-rendered HTML always shows the hidden state.
  • Both single buttons and the group's trigger participate in focus-visible styling with the standard kit focus ring.