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

@limetech/mdc-line-ripple

v4.0.1-p4.0.0.1

Published

The Material Components for the web line-ripple component

Downloads

74

Readme

Line Ripple

The line ripple is used to highlight user-specified input above it. When a line ripple is active, the line’s color and thickness changes.

Design & API Documentation

Installation

npm install @limetech/mdc-line-ripple

Basic Usage

HTML Structure

<div class="mdc-line-ripple"></div>

Styles

@import "@limetech/mdc-line-ripple/mdc-line-ripple";

JavaScript Instantiation

import {MDCLineRipple} from '@limetech/mdc-line-ripple';

const lineRipple = new MDCLineRipple(document.querySelector('.mdc-line-ripple'));

Style Customization

CSS Classes

CSS Class | Description --- | --- mdc-line-ripple | Mandatory. mdc-line-ripple--active | Styles the line ripple as an active line ripple. mdc-line-ripple--deactivating | Styles the line ripple as a deactivating line ripple.

Sass Mixins

Mixin | Description --- | --- mdc-line-ripple-color($color) | Customizes the color of the line ripple when active.

MDCLineRipple Properties and Methods

Method Signature | Description --- | --- activate() => void | Proxies to the foundation's activate() method. deactivate() => void | Proxies to the foundation's deactivate() method. setRippleCenter(xCoordinate: number) => void | Proxies to the foundation's setRippleCenter(xCoordinate: number) method.

Usage Within Frameworks

If you are using a JavaScript framework, such as React or Angular, you can create a Line Ripple for your framework. Depending on your needs, you can use the Simple Approach: Wrapping MDC Web Vanilla Components, or the Advanced Approach: Using Foundations and Adapters. Please follow the instructions here.

MDCLineRippleAdapter

Method Signature | Description --- | --- addClass(className: string) => void | Adds a class to the root element. removeClass(className: string) => void | Removes a class from the root element. hasClass(className: string) => boolean | Determines whether the root element has the given CSS class name. setStyle(propertyName: string, value: string) => void | Sets the style property with propertyName to value on the root element. registerEventHandler(evtType: EventType, handler: EventListener) => void | Registers an event listener on the root element for a given event. deregisterEventHandler(evtType: EventType, handler: EventListener) => void | Deregisters an event listener on the root element for a given event.

MDCLineRippleFoundation

Method Signature | Description --- | --- activate() => void | Activates the line ripple. deactivate() => void | Deactivates the line ripple. setRippleCenter(xCoordinate: number) => void | Sets the center of the ripple to the xCoordinate given. handleTransitionEnd(evt: Event) => void | Handles a transitionend event.