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

@frankhoodbs/accordion-cmp

v1.2.14

Published

Accordion component

Downloads

498

Readme

Accordion component

Introducing an accordion component designed with both customization and accessibility in mind. This component seamlessly integrates with your Vue projects, offering expandable and collapsible content panels. With built-in support for ARIA attributes, it ensures a user-friendly experience for all, including those using assistive technologies. Customize its appearance and behavior to fit your site's design aesthetics and functional requirements. Empower your web application with an accordion that's both visually engaging and inclusively designed.

Version License

API Reference

Props

| Name | Type | Description | |:------------------|:----------|:----------------------------------------------| | data-id-prefix | string | required Prefix for all the id attributes | | data-header-tag | string | HTML tag for headers. Default "h3" | | data-auto-close | boolean | Keep open only one section at time |

Slots

| Name | Description | |:-------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------| | header-${index} | Required. Slot for headers. Replace ${index} with an incremental number, starting at 1. Scoped slot with extended boolean parameter. | | content-${index} | Required. Slot for contents. Replace ${index} with an incremental number, starting at 1. The associated header and content must have the same index. |

CSS custom properties

| Name | Default | Description | |:--------------------------------------|:--------|:------------------------------------------| | --accordion-cmp-transition-duration | 0.5s | Accordion open animation time. | | --accordion-cmp-transition-easing | ease | Accordion open animation timing function. |

Usage/Examples

<accordion-cmp
  data-id-prefix="AccordionCmp-1"
  :data-auto-close="true"
  data-header-tag="h2"
>
  <template #header-1="{ expanded }">
    <span :class="['header', { expanded }]">Header 1</span>
  </template>
  <template #content-1>
    <div class="content">
      <p>
        Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do
        eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut
        enim ad minim veniam, quis nostrud exercitation ullamco laboris
        nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor
        in reprehenderit in voluptate velit esse cillum dolore eu fugiat
        nulla pariatur. Excepteur sint occaecat cupidatat non proident,
        sunt in culpa qui officia deserunt mollit anim id est laborum.
      </p>
    </div>
  </template>
  <template #header-2="{ expanded }">
    <span :class="['header', { expanded }]">Header 2</span>
  </template>
  <template #content-2>
    <div class="content">
      <p>
        Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do
        eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut
        enim ad minim veniam, quis nostrud exercitation ullamco laboris
        nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor
        in reprehenderit in voluptate velit esse cillum dolore eu fugiat
        nulla pariatur. Excepteur sint occaecat cupidatat non proident,
        sunt in culpa qui officia deserunt mollit anim id est laborum.
      </p>
    </div>
  </template>
</accordion-cmp>