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

@visual-framework/vf-cluster

v1.0.2

Published

vf-cluster component

Downloads

1,633

Readme

The Cluster Layout component

npm version

About

The vf-cluster is a layout component that can be used when we need to give various content items (of indeterment sizes) an equaly spaced layout on the page that can respond to the browsers viewport width.

Usage

The main use case for vf-cluster is to be mainly used when something the available grid systems are too 'rigid' because of the different widths of the content.

Integration

Eleventy

To use the vf-cluster component we make use of the @extends directive from Nunjucks to 'wrap' around the content we want this layout component to render.

Requirements

To use the vf-cluster component you must be using vX.X.X of vf-eleventy.

Code

In the .njk file you are wanting to use the vf-cluster you must include the following code to 'extend' the file with the vf-cluster component.

{% raw %}

{% extends layout.cluster %}

{% endraw %}

You will then need to create a 'block' to put the relevant content inside so that it renders within the vf-cluster layout when rendered.

{% raw %}

{% block cluster_content %}
...
{% endblock %}

{% endraw %}

To make use of .yml to render the vf-cluster to the variant you wish to use, you will have to 'set' the context in the .njk file.

{% raw %}

{% set context = cluster1 %}

{% endraw %}

note: cluster1 is an example, please pick your own semantic, readable context names With these set you can then add the relevant content as needed.

WordPress

Requirements

To use the vf-cluster component you must be using vX.X.X of vf-wp.

Variants

There are four spacing variants and three alignment variants available for this component as well as an option to define the width of the vf-clusters children.

| custom property | options | default | | -------------- | ----------------------------- | ----------- | | spacing | small, medium, large | none | | alignment | start, center, end | none |

Spacing Variants

There are three spacing variants that determina the inline and block spacing between items of content inside of vf-cluster.

Alignment Variants

This variant determines where the child components align in the vertical space available. When setting this in your .yml file it will add the relevant CSS value as the inline CSS custom property -vf-cluster-alignment.

CSS Custom Properties

| custom property | options | example | | ------------------------ | ------------------------------------------------------- | ----------- | | --vf-cluster-alignment | could be used for a different vertical alignment value | baseline | | --vf-cluster-margin | can take a CSS size value to overide the defualt | 31px | | --vf-cluster__item--flex | can take a CSS flex value to determine the child widths | 210px 1 0 |

Install

This repository is distributed with npm. After installing npm and yarn, you can install vf-cluster with this command.

$ yarn add --dev @visual-framework/vf-cluster

Sass/CSS

The source files included are written in scss syntax of Sass. You can point your sass include-path at your node_modules directory and import it like this.

@import "@visual-framework/vf-cluster/index.scss";

Make sure you import Sass requirements along with the modules. You can use a project boilerplate or the vf-sass-starter

Help