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

@patternfly/pfe-accordion

Package Overview
Dependencies
Maintainers
10
Versions
84
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@patternfly/pfe-accordion

Accordion element for PFElements

  • 1.0.0-prerelease.10
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
70
decreased by-66.82%
Maintainers
10
Weekly downloads
 
Created
Source

WIP 🐣: PFElements Accordion Element

Usage

<pfe-accordion>
  <pfe-accordion-header>
    <h2>Why do wizards need money if they could just create it?</h2>
  </pfe-accordion-header>
  <pfe-accordion-panel>
    <p>There is legislation that decides what you can conjure and what you can not. Because things that you conjure out of thin air will not last, it is illegal in the wizarding world.</p>
  </pfe-accordion-panel>
  <pfe-accordion-header>
    <h2>Why doesn't Harry have a portrait of his parents?</h2>
  </pfe-accordion-header>
  <pfe-accordion-panel>
    <p>The characters in the portraits are not actually ghosts. They mainly are there just to repeat common phrases or serve as a general representation of the individual they depict. A portrait of his parents would not be of much help to Harry.</p>
  </pfe-accordion-panel>
</pfe-accordion>

Slots

Default slot in pfe-accordion

Place the pfe-accordion-header and pfe-accordion-panel elements here.

Default slot in pfe-accordion-header

We expect the light DOM of the pfe-accordion-header to be a heading level tag (h1, h2, h3, h4, h5, h6)

Default slot in pfe-accordion-panel

Add the content for your accordion panel here.

Attributes

color Changes the color of <pfe-accordion-header>

ValueDescription
stripedAlternates light and lightest theme colors on <pfe-accordion-header>
lightestlightest theme color
light (default)light theme color
basebase theme color
darkdark theme color
darkestdarkest theme color
complementcomplementtheme color
accentaccent theme color

Styling

Theme Var HookDescriptionDefault
--pfe-theme--color--surface--lighterDefault <pfe-accordion-header> color$pfe-color--surface--lighter
--pfe-theme--color--surface--lighter--textDefault <pfe-accordion-header> text color$pfe-color--surface--lighter--text
--pfe-theme--color--surface--lighter--link--focusFocus border color for default <pfe-accordion-header>$pfe-color--surface--lighter--link--focus
--pfe-theme--color--surface--lightestLightest <pfe-accordion-header> color option$pfe-color--surface--lighter
--pfe-theme--color--surface--lightest--textLightest <pfe-accordion-header> text color option$pfe-color--surface--lightest--text
--pfe-theme--color--surface--lightest--link--focusFocus border color for lightest <pfe-accordion-header>$pfe-color--surface--lightest--link--focus
--pfe-theme--color--surface--baseBase <pfe-accordion-header> color option$pfe-color--surface--base
--pfe-theme--color--surface--base--textBase <pfe-accordion-header> text color option$pfe-color--surface--base--text
--pfe-theme--color--surface--base--link--focusFocus border color for base <pfe-accordion-header>$pfe-color--surface--base--link--focus
--pfe-theme--color--surface--darkerDark <pfe-accordion-header> color option$pfe-color--surface--darker
--pfe-theme--color--surface--darker--textDark <pfe-accordion-header> text color option$pfe-color--surface--darker--text
--pfe-theme--color--surface--darker--link--focusFocus border color for dark <pfe-accordion-header>$pfe-color--surface--darker--link--focus
--pfe-theme--color--surface--darkestDarkest <pfe-accordion-header> color option$pfe-color--surface--darkest
--pfe-theme--color--surface--darkest--textDarkest <pfe-accordion-header> text color option$pfe-color--surface--darkest--text
--pfe-theme--color--surface--darkest--link--focusFocus border color for darkest <pfe-accordion-header>$pfe-color--surface--darkest--link--focus
--pfe-theme--color--surface--complementComplement <pfe-accordion-header> color option$pfe-color--surface--complement
--pfe-theme--color--surface--complement--textComplement <pfe-accordion-header> text color option$pfe-color--surface--complement--text
--pfe-theme--color--surface--complement--link--focusFocus border color for complement <pfe-accordion-header>$pfe-color--surface--complement--link--focus
--pfe-theme--color--surface--accentAccent <pfe-accordion-header> color option$pfe-color--surface--accent
--pfe-theme--color--surface--accent--textAccent <pfe-accordion-header> text color option$pfe-color--surface--accent--text
--pfe-theme--color--surface--accent--link--focusFocus border color for accent <pfe-accordion-header>$pfe-color--surface--accent--link--focus

Events

pfe-accordion:change

Fires when an pfe-accordion-header is activated. The detail object contains the following

detail: {
  expanded: Boolean
}

Test

npm run test

Build

npm run build

Demo

From the PFElements root directory, run:

npm start

Code style

Accordion (and all PFElements) use Prettier to auto-format JS and JSON. The style rules get applied when you commit a change. If you choose to, you can integrate your editor with Prettier to have the style rules applied on every save.

FAQs

Package last updated on 26 Mar 2019

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