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

cp-angular-tile

v0.0.2

Published

The Tile Component provides a component that can be used to create a tile with hover effect. Here are the steps to use the library in your Angular project:

Downloads

7

Readme

Tile Component

The Tile Component provides a component that can be used to create a tile with hover effect. Here are the steps to use the library in your Angular project:

Installation

To use the Tile Component, you need to install it as a dependency in your Angular project. Run the following command in your project's root directory:

npm install cp-angular-tile --save

This will install the library and save it as a dependency in your project's package.json file.

Importing the module

After installing the library, you need to import the TileModule in your Angular module.

import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { TileModule } from 'cp-angular-tile';

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

Using the component

Once you have imported the module, you can use the angular-hover-tile component in your Angular templates.

<lht-tile href="/home">
  <div content>
    <!-- Content for the default state of the tile goes here -->
  </div>
  <div hover-content>
    <!-- Content for the hover state of the tile goes here -->
  </div>
</lht-tile>

The tile component takes two content slots: content and hover-content. The content in the content slot is displayed when the tile is in its default state, and the content in the hover-content slot is displayed when the tile is in its hover state.

The href attribute is optional and can be used to specify the destination of the tile link. If the href attribute is not present, the tile will not be clickable.

Styling the component

The angular-hover-tile component has default styles, but you can override them by adding your own styles to your Angular component or global stylesheet.

Here are the CSS classes that you can use to style the component:

.default: Styles for the default state of the tile

.hover: Styles for the hover state of the tile

For example, to change the background color of the tile in its default state, you can add the following styles to your component or global stylesheet:

angular-hover-tile .default {
  background-color: #f1f1f1;
}