New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

@atendesign/javascript-components

Package Overview
Dependencies
Maintainers
4
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@atendesign/javascript-components

A collection of JavaScript libraries that adhere ceremoniously with WCAG guidelines.

Source
npmnpm
Version
1.1.0
Version published
Weekly downloads
36
38.46%
Maintainers
4
Weekly downloads
 
Created
Source

Aten Design Group -- JavaScript Components

npm version License: MIT

A collection of JavaScript libraries that adhere ceremoniously with WCAG guidelines. This package provides accessible, keyboard-navigable UI components with full ARIA support and responsive design capabilities.

🐛 Issues & Support

Found a bug or have a feature request? Please open an issue on GitHub.

👤 Author

Philip Stier - Tech Lead, Senior Developer

Installation

npm install @atendesign/javascript-components

Accordion

Features

  • 🌟 Fully accessible implementation
  • ⌨️ Keyboard navigation support
  • 📱 Responsive design
  • 🎨 Customizable styling
  • 🔄 Toggle state management

Basic Usage

HTML

<div class="accordion">
    <h3 class="accordion__heading">
        <button id="accordion-trigger-01" class="accordion__trigger" aria-expanded="false" aria-controls="accordion-section-01>
            Accordion Section
        </button>
    </h3>

    <div id="accordion-section-01" class="accordion__content" role="region" aria-labelledby="accordion-trigger-01">
        <p>This is the accordion content.</p>
    </div>
</div>

JavaScript

import { Accordion } from '@atendesign/javascript-components';

document.addEventListener('DOMContentLoaded', function() { 
    document.querySelectorAll('.accordion').forEach(accordion => {
        const accordionComponent = new Accordion(accordion, {options});
        accordionComponent.init();
    });
});

Options

OptionTypeDefaultDescription
selectors.triggerstring'.accordion__trigger[aria-controls]'CSS selector for accordion trigger buttons
classes.expandedstring'is-expanded'CSS class applied to expanded accordion state

Custom Options Example

const accordionComponent = new Accordion(accordionElement, {
    selectors: {
        trigger: '.my-accordion__trigger[aria-controls]',
    },
    classes: {
        expanded: 'is-open',
    },
});

accordionComponent.init();

Required HTML Attributes

  • aria-expanded on trigger button (automatically managed by the component)
  • aria-controls on trigger button (must match content panel's ID)
  • id on content panel (must match trigger's aria-controls value)
  • aria-labelledby on content panel (must match trigger button's ID)
  • role="region" on content panel

Keyboard Support

  • Enter or Space: Toggle accordion section
  • Mouse click: Toggle accordion section

Tab Content

Features

  • 🌟 Fully accessible implementation
  • ⌨️ Keyboard navigation support
  • 📱 Responsive design
  • 🎨 Customizable styling
  • 🔄 Tab state management

Basic Usage

HTML

<div class="tab-content">
  <div role="tablist" class="tab-content__navigation"></div>

  <div id="tab-content-01"
       class="tab-content__group is-expanded"
       role="tabpanel"
       aria-labelledby="tab-tab-content-01">
    <button type="button"
            id="tab-tab-content-01"
            class="tab-content__trigger is-expanded"
            role="tab"
            aria-haspopup="true"
            aria-selected="true"
            aria-expanded="true"
            aria-controls="tab-content-01">
      Tab 01
    </button>

    <div class="tab-content__content">
      <p>Text content goes here - Tab 01</p>
    </div>
  </div>
</div>

JavaScript

import { TabContent } from '@atendesign/javascript-components';

document.addEventListener('DOMContentLoaded', function() { 
    document.querySelectorAll('.tab-content').forEach(tabContent => {
        const tabContentComponent = new TabContent(tabContent);
        tabContentComponent.init();
    });
});

Options

OptionTypeDefaultDescription
selectors.navigationstring'.tab-content__navigation'CSS selector for desktop tab navigation container
selectors.groupstring'.tab-content__group'CSS selector for tab groups
selectors.triggerstring'.tab-content__trigger'CSS selector for tab trigger buttons
classes.expandedstring'is-expanded'CSS class applied to expanded tabs/groups
breakpointnumber768Media breakpoint where tabs switch to accordions

Custom Options Example

const tabContentComponent = new TabContent(tabContentElement, {
    selectors: {
        navigation: '.my-tabs__navigation',
        group: '.my-tabs__group',
        trigger: '.my-tabs__trigger',
    },
    classes: {
        expanded: 'is-open',
    },
    breakpoint: 1024,
});

tabContentComponent.init();

Required HTML Attributes

  • role="tablist" on tab container
  • role="tab" on each tab button
  • role="tabpanel" on each content panel
  • aria-selected on tab buttons (automatically managed by the component)
  • aria-controls on tab buttons (must match panel's ID)
  • id on content panels (must match tab's aria-controls value)
  • aria-labelledby on content panels (must match tab button's ID)
  • tabindex on tab buttons (automatically managed by the component)

Keyboard Support

  • Arrow Left/Right: Navigate between tabs
  • Home: Move to first tab
  • End: Move to last tab
  • Enter or Space: Activate focused tab
  • Mouse click: Activate tab

Menu

Features

  • 🌟 Fully accessible implementation
  • ⌨️ Keyboard navigation support
  • 📱 Responsive design (desktop/mobile state)
  • 🎨 Customizable styling
  • 🔄 Submenu expand/collapse management
  • 🖱️ Click-outside to close

Basic Usage

HTML

<nav class="menu">
  <ul class="menu__items">
    <li class="menu__item">
      <a class="menu__link" href="#">Home</a>
    </li>
    <li class="menu__item">
      <button class="menu__dropdown-trigger" aria-expanded="false">About</button>
      <div class="menu__dropdown">
        <ul class="menu__items">
          <li class="menu__item">
            <a class="menu__link" href="#">Our Team</a>
          </li>
          <li class="menu__item">
            <a class="menu__link" href="#">Our Story</a>
          </li>
        </ul>
      </div>
    </li>
    <li class="menu__item">
      <a class="menu__link" href="#">Services</a>
    </li>
  </ul>
</nav>

JavaScript

import { Menu } from '@atendesign/javascript-components';

document.addEventListener('DOMContentLoaded', function() {
    document.querySelectorAll('.menu').forEach(menu => {
        const menuComponent = new Menu(menu);
        menuComponent.mount();
    });
});

Options

OptionTypeDefaultDescription
selectors.triggerstring'.menu__dropdown-trigger'CSS selector for dropdown trigger buttons
selectors.itemsstring'.menu__items'CSS selector for the menu items container
selectors.itemstring'.menu__item'CSS selector for individual menu items
selectors.linkstring'.menu__link'CSS selector for menu item links
selectors.dropdownstring'.menu__dropdown'CSS selector for dropdown containers
classes.expandedstring'is-expanded'CSS class applied to expanded dropdown state
breakpointnumber768Viewport width (px) at which the menu switches between mobile and desktop behaviour

Custom Options Example

const menuComponent = new Menu(menuElement, {
    selectors: {
        trigger: '.my-menu__dropdown-trigger',
        items: '.my-menu__items',
        item: '.my-menu__item',
        link: '.my-menu__link',
        dropdown: '.my-menu__dropdown',
    },
    classes: {
        expanded: 'is-open',
    },
    breakpoint: 1024,
});

menuComponent.mount();

Required HTML Attributes

  • aria-expanded on dropdown trigger buttons (automatically managed by the component)

Keyboard Support

KeyAction
Enter or SpaceExpand focused submenu and move focus to its first item
Arrow DownExpand submenu (focus first item) or move to the next sibling item
Arrow UpExpand submenu (focus last item) or move to the previous sibling item
Arrow RightWhen inside a submenu, collapse it and move focus to the next top-level item
Arrow LeftWhen inside a submenu, collapse it and move focus to the previous top-level item
EscapeCollapse the open submenu and return focus to its trigger
HomeClose all submenus and focus the first top-level menu item
EndClose all submenus and focus the last top-level menu item
Mouse clickToggle submenu / close all when clicking outside the menu

Lifecycle Methods

MethodDescription
mount()Attaches all event listeners and initialises the responsive media query
destroy()Removes all event listeners and cleans up the component

FAQs

Package last updated on 11 Mar 2026

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