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

@2alheure/vue-accordion

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@2alheure/vue-accordion

A simple Accordion component for Vue.js

latest
Source
npmnpm
Version
1.0.2
Version published
Maintainers
1
Created
Source

Vue JS Accordion

A simple Accordion component for Vue JS.
This component is compatible with Vue 3.

  • Vue JS Accordion

Installation

First, run npm install @2alheure/vue-accordion.
Then import it with import Accordion from "@2alheure/vue-accordion";.

Usage

Simple usage example

<Accordion :headerStyle="headerStyle" :contentStyle="contentStyle">
  <template #header">
    Your accordion title. Can also be <strong>HTML</strong>.
  </template>

  Your accordion content. It can be simple text like this.
  <p>It can also be HTML.</p>
</Accordion>

<script>
  import Accordion from "@2alheure/vue-accordion";
  
  export default {
    components: {
      Accordion
    },
    data() {
      return {
        headerStyle: 'background-color: white;',
        contentStyle: {
          color: 'red',
          fontSize: '42px'
        }
      }
    }
  };
</script>

Props

NameTypeDefault valueDescription
openedBooleanfalseWhether the content should be displayed when loaded.
symbolOpenedString&or;The symbol to use for the opened accordion. (Can be HTML.)
symbolClosedString&gt;The symbol to use for the closed accordion. (Can be HTML.)
headerStyleString / Objectpadding: .5rem;The style for the header.
symbolStyleString / Objectfont-size: 1.5rem; font-weight: 700; vertical-align: middle;The style for the symbol.
contentStyleString / Objectwidth: 98%; margin: auto; padding: .5rem;The style for the content.
accordionClassString / ObjectnullThe classes for the accordion.
headerClassString / ObjectnullThe classes for the header.
symbolClassString / ObjectnullThe classes for the symbol.
contentClassString / ObjectnullThe classes for the content.

Events

NameDescription
openEmitted each time the accordion is opened.
closeEmitted each time the accordion is closed.
switchEmitted each time the accordion switches between open and close.

Keywords

Vue.js

FAQs

Package last updated on 31 Aug 2021

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