5.8.0 • Published 1 year ago

@bolt/components-share v5.8.0

Weekly downloads
2
License
MIT
Repository
github
Last release
1 year ago

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"
5.8.0

1 year ago

5.5.0

2 years ago

5.1.0

2 years ago

5.2.0

2 years ago

5.0.1

2 years ago

4.7.0

2 years ago

4.1.0

3 years ago

4.0.0

3 years ago

3.6.0

3 years ago

3.4.4

3 years ago

3.5.2

3 years ago

3.5.0

3 years ago

3.4.0

3 years ago

3.3.0

3 years ago

3.1.2

3 years ago

3.1.0

3 years ago

2.31.0

3 years ago

3.0.1

3 years ago

2.30.0

3 years ago

3.0.0

3 years ago

2.29.1

3 years ago

2.29.0

3 years ago

2.28.0

4 years ago

2.26.0

4 years ago

2.25.1

4 years ago

2.25.0

4 years ago

2.24.1

4 years ago

2.24.0

4 years ago

2.23.0

4 years ago

2.22.0

4 years ago

2.21.0

4 years ago

2.20.0

4 years ago

2.19.0

4 years ago

2.18.1

4 years ago

2.18.0

4 years ago

2.17.0

4 years ago

2.16.2

4 years ago

2.16.1

4 years ago

2.16.0

4 years ago

2.15.2

4 years ago

2.15.0

4 years ago

2.14.0

4 years ago

2.13.0

4 years ago

2.12.1

4 years ago

2.11.5

4 years ago

2.10.2

4 years ago

2.12.0

4 years ago

2.11.2

4 years ago

2.11.0

4 years ago

2.10.0

5 years ago

2.9.2

5 years ago

2.9.0

5 years ago

2.8.1

5 years ago

2.8.0

5 years ago

2.8.0-beta.6

5 years ago

2.8.0-beta.4

5 years ago

2.8.0-beta.3

5 years ago

2.8.0-beta.2

5 years ago

2.8.0-beta.1

5 years ago

2.7.0

5 years ago

2.6.0

5 years ago

2.6.0-beta.2

5 years ago

2.6.0-beta.1

5 years ago

2.5.6

5 years ago

2.5.3

5 years ago

2.5.2

5 years ago

2.5.1

5 years ago

2.4.3

5 years ago

2.4.0

5 years ago

2.3.2

5 years ago

2.3.1

5 years ago

2.4.0-beta.0

5 years ago

2.3.0

5 years ago

2.3.0-rc.0

5 years ago

2.2.2

5 years ago

2.2.0

5 years ago

2.2.0-rc.1

5 years ago

2.1.6

6 years ago

2.1.5

6 years ago

2.1.4

6 years ago

2.1.3

6 years ago

2.1.1

6 years ago

2.1.0

6 years ago

2.1.0-beta.0

6 years ago

2.0.0

6 years ago

2.0.0-beta.3

6 years ago

2.0.0-beta.2

6 years ago

2.0.0-beta.1

6 years ago

2.0.0-beta.0

6 years ago

1.8.1

6 years ago

1.8.0

6 years ago

1.7.0

6 years ago

1.6.4

6 years ago

1.6.3

6 years ago

1.6.2

6 years ago

1.6.1

6 years ago

1.6.0

6 years ago

1.5.2

6 years ago

1.5.1

6 years ago

1.5.0

6 years ago

1.4.1

6 years ago

1.4.0

6 years ago

1.3.4

6 years ago

1.3.0

6 years ago

1.2.3

6 years ago

1.2.2

6 years ago

1.2.0

6 years ago

1.1.4

6 years ago

1.1.2

6 years ago

1.1.1

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago

1.0.0-rc.12

6 years ago

1.0.0-rc.11

6 years ago