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

@bolt/components-share

v5.8.0

Published

A list of share-to-social-media actions.

Downloads

366

Readme

Share block. Part of the Bolt “Components” CSS framework that powers the Bolt Design System.

Install via NPM
npm install @bolt/components-share

Description

The share component provides the user a visual queue to share the content with relevant peers, as well as an easy mechanism to actively do the sharing.

OG Tags

  • OG tags MUST be present for share functionality to work correctly (see example below)
  • The only currently supported share methods are:
    • Facebook
    • Twitter
    • LinkedIn
    • Email
    • Copy to Clipboard (component)
  • Facebook only needs u (URL) to scrap the page's OG Tags
    • Facebook Sharing API resources: https://developers.facebook.com/docs/sharing/reference/share-dialog#params_share
    • Facebook Open Graph Debuger: https://developers.facebook.com/tools/debug/
  • Twitter Needs at least one of the following query vars:
    • url (recommended -- URL included with the Twee)
    • text (recommended -- re-populated text highlighted in the Tweet composer)
    • via (Attribute the source of a Tweet to a Twitter username, no @ needed)
    • hashtags (A comma-separated list of hashtags to be appended to default Tweet text)
      • Twitter Tweet API resources: https://dev.twitter.com/web/tweet-button/parameters#tweet-content-parameters
      • Twitter card validator: https://cards-dev.twitter.com/validator
  • LinkedIn only needs url to scrap the page's OG Tags, but also can include:
    • title
    • summary
    • source
      • LinkedIn Sharing API resources: https://developer.linkedin.com/docs/share-on-linkedin (click "Customized URL")
  • Email Recommended query vars:
    • subject
    • body

Example

<meta property="og:type" content="article" />
<meta property="og:title" content="Bolt Design System: Page Title" />
<meta property="og:description" content="Sample description" />
<meta
  property="og:image"
  content="https://boltdesignsystem.com/images/500x500-480.jpg"
/>
<meta property="og:image:type" content="image/jpeg" />
<meta property="og:image:width" content="480" />
<meta property="og:image:height" content="480" />
<meta
  property="og:url"
  content="https://boltdesignsystem.com/some-page-title-here"
/>
<meta property="og:site_name" content="Bolt Design System" />
<!-- Twitter specific tags -->
<meta name="twitter:card" content="summary" />
<meta name="twitter:title" content="Bolt Design System: Page Title" />
<meta name="twitter:description" content="Sample description" />
<meta
  name="twitter:image"
  content="https://boltdesignsystem.com/images/500x500-480.jpg"
/>
<meta name="twitter:site" content="@pega" />

Best Practices

  • Don't use the share tool with a page's related sections
  • Implement any "stickiness" and placement functionality on the platform the component is being used in
  • For larger screens, ease-in opacity from 0% to 100% on scroll. The placement should be lower right-hand side and fixed until the main page content is scrolled pass
  • Don't have the fixed position of the component overlap any "related content"