Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@tabbycss/tabby

Package Overview
Dependencies
Maintainers
0
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tabbycss/tabby

Tabby is an accessible tab library built entirely with CSS.

  • 0.0.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
0
Weekly downloads
 
Created
Source

Logo Banner

Tabby is an accessible tab library built entirely with CSS.

Quick start

There are 3 ways to get started with tabby.css:

Install manually

Download Tabby and link css/tabby.min.css in the <head> of your website.

<link rel="stylesheet" href="css/tabby.min.css" />

Usage from CDN

Alternatively, you can use jsDelivr CDN to link tabby.css

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@tabbycss/tabby/css/tabby.min.css" />

Install with NPM

npm install @tabbycss/tabby

Usage in HTML

index.html

<div role="tablist" class="tabby">
    <a role="tab" class="tab" selected>
        Movies
        <div class="tab-border"></div>
    </a>
    <a role="tab" class="tab">
        Shows
        <div class="tab-border"></div>
    </a>
    <a role="tab" class="tab" disabled>
        Disabled
        <div class="tab-border"></div>
    </a>
</div>

To add functionality to tabby we can add this snippet of javascript.

index.html

<script>
  const Tabby = document.querySelectorAll('.tabby');
  
  Tabby.forEach(container => {
    const Tabs = container.querySelectorAll('.tab');

    Tabs.forEach(item => {
      item.addEventListener('click', () => {
        Tabs.forEach(i => i.removeAttribute('selected'));
        item.setAttribute('selected', '');
      });
    });
  });
</script>

Check out the demo on codepen.

Licensed under the MIT License, Copyright © 2024-present tabbycss.

See LICENSE for more information.

FAQs

Package last updated on 02 Oct 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc