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

blue-tablist

v1.0.0

Published

web components for Tab element.

Downloads

3

Readme

tablist

web components for Tab element.

usage

你可以这样用

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
    <title>tablist</title>
    <style>
      h3 {
        margin: 0;
      }
      .section-top {
        height: 240px;
      }
    </style>
  </head>
  <body>
    <main id="main">
      <tab-list class="section-top">
        <h3 slot="nav">茶卡盐湖</h3>
        <div slot="content">
          <p>走自己的路,其他的交给天空</p>
        </div>
        <h3 slot="nav">胡里山环岛路</h3>
        <div slot="content">
          <p>跟着心不会迷路</p>
          <p>长的是磨难</p>
          <p>短的是人生</p>
        </div>
        <h3 slot="nav">靖西</h3>
        <div slot="content">
          <p>星汉流珠落九天 江眠狮子壮山川<p>
          <p>鹅泉跃鲤三层浪 伏石牛鸣吹月旋<p>
          <p>紫璧樵歌赏荫雨 虎寨腾烟四野绵<p>
          <p>凤凰展翅呈奇瑞 龙潭随饮马投钱<p>
        </div>
      </tab-list>
    </main>
    <!-- <script type="module" src="https://unpkg.com/blue-tablist@1/dist/tablist.esm.js"></script> -->
    <script src="https://unpkg.com/blue-tablist@1/dist/tablist.umd.js"></script>
  </body>
</html>

同时,组件还提供了Chrome Tab页签的自定样式,通过href指定CSS,像这样使用

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
    <title>tablist</title>
    <style>
      h3 {
        margin: 0;
      }
      .sectionn-bottom {
        height: 400px;
      }
    </style>
  </head>
  <body>
    <main id="main">
      <tab-list class="sectionn-bottom" href="https://unpkg.com/blue-tablist@1/lib/tab-chrome.css"> 
        <div slot="nav" class="chrome-tab">文件</div>
        <div slot="content">
          <p>新标签页</p>
        </div>
        <div slot="nav" class="chrome-tab">编辑</div>
        <div slot="content">
          <p>剪切</p>
          <p>复制</p>
        </div>
        <div slot="nav" class="chrome-tab">❤历史记录❤</div>
        <div slot="content">
          <p>Home</p>
        </div>
      </tab-list>
    </main>
    <script src="https://unpkg.com/blue-tablist@1/dist/tablist.umd.js"></script>
  </body>
</html>

Specifying tablist versions

Note that in both of the examples below, tablist URLs will need to be manually updated when a new major version of tablist is released (e.g. v1.x.x => v2.x.x). Check the tablist website periodically to see if a new major version has been released.

Specifying a major version in the URL (@1) will allow your site will receive non-breaking enhancements (i.e. "minor" updates) and bug fixes (i.e. "patch" updates) automatically. This is the recommended way to load tablist resources.

If you prefer to lock tablist to a specific version, specify the full version after the @ symbol in the URL. This is the safest way to ensure your site will look and behave the same way regardless of any changes made to future versions of tablist.

<script src="https://unpkg.com/[email protected]/dist/tablist.umd.js"></script>