Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <div class="container">
  <h1>Social Share Buttons for Any Website</h1>
  <p>Social share buttons for Facebook, Twitter, LinkedIn, Google+, Reddit and Hacker News using Bootstrap 4 and Font Awesome 5. Comes in solid, outline and their fluid versions. Can easily be integrated with any website.</p>
  <p>Copy corresponding HTML and CSS to your website and replace <code>PAGE_URL</code> and <code>PAGE_TITLE</code> with the page's URL and title to be shared.</p>
  
  <h2>Solid</h2>
  <div>
    <a class="btn btn-sm btn-social btn-fb" href="https://www.facebook.com/sharer/sharer.php?u=PAGE_URL" target="_blank" title="Share this post on Facebook">
        <i class="fab fa-facebook-square"></i> Share
    </a>
      <a class="btn btn-sm btn-social btn-tw" href="https://twitter.com/intent/tweet?text=PAGE_TITLE&amp;url=PAGE_URL" target="_blank" title="Share this post on Twitter">
        <i class="fab fa-twitter"></i> Tweet
    </a>
    <a class="btn btn-sm btn-social btn-in" href="https://www.linkedin.com/shareArticle?mini=true&url=PAGE_URL&amp;title=PAGE_TITLE" target="_blank" title="Share this post on LinkedIn">
      <i class="fab fa-linkedin-in" data-fa-transform="grow-2"></i>
    </a>
    <a class="btn btn-sm btn-social btn-gp" href="https://plus.google.com/share?url=PAGE_URL" target="_blank" title="Share this post on Google Plus">
      <i class="fab fa-google-plus-g" data-fa-transform="grow-2"></i>
    </a>
    <a class="btn btn-sm btn-social btn-rd" href="https://www.reddit.com/submit?url=PAGE_URL&title=PAGE_TITLE" target="_blank" title="Share this post on Reddit">
      <i class="fab fa-reddit-alien" data-fa-transform="grow-4"></i>
    </a>
    <a class="btn btn-sm btn-social btn-hn" href="https://news.ycombinator.com/submitlink?u=PAGE_URL&t=PAGE_TITLE" target="_blank" title="Share this post on Hacker News">
      <i class="fab fa-hacker-news" data-fa-transform="grow-4"></i>
    </a>
  </div>
  
  <h2>Solid - Fluid</h2>
  <div class="fluid">
    <a class="btn btn-sm btn-social btn-fb" href="https://www.facebook.com/sharer/sharer.php?u=PAGE_URL" target="_blank" title="Share this post on Facebook">
        <i class="fab fa-facebook-square"></i> Share
    </a>
      <a class="btn btn-sm btn-social btn-tw" href="https://twitter.com/intent/tweet?text=PAGE_TITLE&amp;url=PAGE_URL" target="_blank" title="Share this post on Twitter">
        <i class="fab fa-twitter"></i> Tweet
    </a>
    <a class="btn btn-sm btn-social btn-in" href="https://www.linkedin.com/shareArticle?mini=true&url=PAGE_URL&amp;title=PAGE_TITLE" target="_blank" title="Share this post on LinkedIn">
      <i class="fab fa-linkedin-in" data-fa-transform="grow-2"></i>
    </a>
    <a class="btn btn-sm btn-social btn-gp" href="https://plus.google.com/share?url=PAGE_URL" target="_blank" title="Share this post on Google Plus">
      <i class="fab fa-google-plus-g" data-fa-transform="grow-2"></i>
    </a>
    <a class="btn btn-sm btn-social btn-rd" href="https://www.reddit.com/submit?url=PAGE_URL&title=PAGE_TITLE" target="_blank" title="Share this post on Reddit">
      <i class="fab fa-reddit-alien" data-fa-transform="grow-4"></i>
    </a>
    <a class="btn btn-sm btn-social btn-hn" href="https://news.ycombinator.com/submitlink?u=PAGE_URL&t=PAGE_TITLE" target="_blank" title="Share this post on Hacker News">
      <i class="fab fa-hacker-news" data-fa-transform="grow-4"></i>
    </a>
  </div>
  
  <h2>Outline</h2>
  <div>
    <a class="btn btn-sm btn-social-outline btn-fb-outline" href="https://www.facebook.com/sharer/sharer.php?u=PAGE_URL" target="_blank" title="">
        <i class="fab fa-facebook-square"></i> Share
    </a>
      <a class="btn btn-sm btn-social-outline btn-tw-outline" href="https://twitter.com/intent/tweet?text=PAGE_TITLE&amp;url=PAGE_URL" target="_blank" title="">
        <i class="fab fa-twitter"></i> Tweet
    </a>
    <a class="btn btn-sm btn-social-outline btn-in-outline" href="https://www.linkedin.com/shareArticle?mini=true&url=PAGE_URL&amp;title=PAGE_TITLE" target="_blank" title="">
      <i class="fab fa-linkedin-in" data-fa-transform="grow-2"></i>
    </a>
    <a class="btn btn-sm btn-social-outline btn-gp-outline" href="https://plus.google.com/share?url=PAGE_URL" target="_blank" title="">
      <i class="fab fa-google-plus-g" data-fa-transform="grow-2"></i>
    </a>
    <a class="btn btn-sm btn-social-outline btn-rd-outline" href="https://www.reddit.com/submit?url=PAGE_URL&title=PAGE_TITLE" target="_blank" title="Share this post on Reddit">
      <i class="fab fa-reddit-alien" data-fa-transform="grow-4"></i>
    </a>
    <a class="btn btn-sm btn-social-outline btn-hn-outline" href="https://news.ycombinator.com/submitlink?u=PAGE_URL&t=PAGE_TITLE" target="_blank" title="Share this post on Hacker News">
      <i class="fab fa-hacker-news" data-fa-transform="grow-4"></i>
    </a>
  </div>

  <h2>Outline - Fluid</h2>
  <div class="fluid">
    <a class="btn btn-sm btn-social-outline btn-fb-outline" href="https://www.facebook.com/sharer/sharer.php?u=PAGE_URL" target="_blank" title="">
        <i class="fab fa-facebook-square"></i> Share
    </a>
      <a class="btn btn-sm btn-social-outline btn-tw-outline" href="https://twitter.com/intent/tweet?text=PAGE_TITLE&amp;url=PAGE_URL" target="_blank" title="">
        <i class="fab fa-twitter"></i> Tweet
    </a>
    <a class="btn btn-sm btn-social-outline btn-in-outline" href="https://www.linkedin.com/shareArticle?mini=true&url=PAGE_URL&amp;title=PAGE_TITLE" target="_blank" title="">
      <i class="fab fa-linkedin-in" data-fa-transform="grow-2"></i>
    </a>
    <a class="btn btn-sm btn-social-outline btn-gp-outline" href="https://plus.google.com/share?url=PAGE_URL" target="_blank" title="">
      <i class="fab fa-google-plus-g" data-fa-transform="grow-2"></i>
    </a>
    <a class="btn btn-sm btn-social-outline btn-rd-outline" href="https://www.reddit.com/submit?url=PAGE_URL&title=PAGE_TITLE" target="_blank" title="Share this post on Reddit">
      <i class="fab fa-reddit-alien" data-fa-transform="grow-4"></i>
    </a>
    <a class="btn btn-sm btn-social-outline btn-hn-outline" href="https://news.ycombinator.com/submitlink?u=PAGE_URL&t=PAGE_TITLE" target="_blank" title="Share this post on Hacker News">
      <i class="fab fa-hacker-news" data-fa-transform="grow-4"></i>
    </a>
  </div>
  
</div>
              
            
!

CSS

              
                .container {
  padding: 50px;
  text-align: center;
}

/* Solid Social Share Buttons */

.btn-social,
.btn-social:visited,
.btn-social:focus,
.btn-social:hover,
.btn-social:active {
  color: #ffffff;
  text-decoration: none;
  transition: opacity .15s ease-in-out;
}

.btn-social:hover,
.btn-social:active {
 opacity: .75;
}

.btn-fb {
  background-color: #3b5998;
}

.btn-tw {
  background-color: #1da1f2;
}

.btn-in {
  background-color: #0077b5;
}

.btn-gp {
  background-color: #db4437;
}

.btn-rd {
  background-color: #ff4500;
}

.btn-hn {
  background-color: #ff4000;
}

/* Outline Social Share Buttons */

.btn-social-outline {
  background-color: transparent;
  background-image: none;
  text-decoration: none;
  transition: color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out;
}

.btn-fb-outline {
  color: #3b5998;
  border-color: #3b5998;
}

.btn-fb-outline:hover,
.btn-fb-outline:active {
  color: #ffffff;
  background-color: #3b5998;
}

.btn-tw-outline {
  color: #1da1f2;
  border-color: #1da1f2;
}

.btn-tw-outline:hover,
.btn-tw-outline:active {
  color: #ffffff;
  background-color: #1da1f2;
}

.btn-in-outline {
  color: #0077b5;
  border-color: #0077b5;
}

.btn-in-outline:hover,
.btn-in-outline:active {
  color: #ffffff;
  background-color: #0077b5;
}

.btn-gp-outline {
  color: #db4437;
  border-color: #db4437;
}

.btn-gp-outline:hover,
.btn-gp-outline:active {
  color: #ffffff;
  background-color: #db4437;
}

.btn-rd-outline {
  color: #ff4500;
  border-color: #ff4500;
}

.btn-rd-outline:hover,
.btn-rd-outline:active {
  color: #ffffff;
  background-color: #ff4500;
}

.btn-hn-outline {
  color: #ff4000;
  border-color: #ff4000;
}

.btn-hn-outline:hover,
.btn-hn-outline:active {
  color: #ffffff;
  background-color: #ff4000;
}

/* Fluid Styles */

.fluid {
  display: flex;
}

.fluid a {
  flex-grow: 1;
  margin-right: 0.25rem;
}

.fluid a:last-child {
  margin-right: 0rem;
}
              
            
!

JS

              
                
              
            
!
999px

Console