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

threads-foundation

v0.0.3

Published

Foundation for the threads design system

Downloads

5

Readme

Threads foundation

Foundational styles for the threads design system.

Build Status

Getting started

npm install --save-dev threads-foundation

And to use the foundation in your Sass file

@import 'threads-foundation' using node-sass-import

or

@import '~threads-foundation/foundation' using sass-loader

Usage

Animations

@function animation-duration(variant)

Returns the animation duration for a given variant

@param {String} $variant The key for the variant. Defaults to base.

@return {Number} The animation duration for the variant

Example:

.default-component {
  animation-duration: animation-duration();
}

.slow-component {
  animation-duration: animation-duration(slow);
}

.fast-component {
  animation-duration: animation-duration(fast);
}

@function animation-timing(variant)

Returns the animation timing function for a given variant

@param {String} $variant The key for the variant. Defaults to base.

@return {String} The spacing for the variant

Example:

.default-component {
  animation-timing-function: animation-timinig();
}

Border radius

@function border-radius()

Returns the default border radius value

@return {Number} The default border radius

Example:

.default-component {
  border-radius: border-radius();
}

Borders

@function border(variant)

Returns the default border radius value

@param {String} $variant The key for the border variant

@return {List} The border value.

Example:

.default-component {
  border: border();
}

.another-component {
  border: border(thick);
}

Colors

@function color(name)

Returns the color value for a given color name

@param {String} $name The name of the color

@return {Number} The color value

Example:

.some-basic-text {
  color: color(ink);
}

.some-error-text {
  color: color(error);
}

Forms

@mixin label

Include the default label styles

Example:

.label {
  @include label;
}

@mixin focus

Include the default focus styles

Example:

:focus {
  @include focus;
}

Layout

@mixin max-width

Include the default max-width for layouts

Example:

.component {
  @include max-width;
}

Spacing

@function spacing(style)

Returns the spacing value for a given variant

@param {String} $variant The key for the style. Defaults to base.

@return {Number} The spacing for the variant

Example:

.some-component {
  padding: spacing();
}

.some-other-component {
  padding: spacing(tight);
}

Utilities

@function rem(value)

Returns the value in rem for a given pixel value.

@param {Number} $value - The pixel value to be converted.

@return {Number} The converted value in rem.

Example:

.some-component {
  height: rem(10px);
}

@function px(value)

Returns the value in pixels for a given rem value.

@param {Number} $value - The rem value to be converted.

@return {Number} The converted value in pixels.

Example:

.some-component {
  height: px(1rem);
}

Testing

npm test