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

@volvo-cars/accordion-component

Package Overview
Dependencies
Maintainers
12
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@volvo-cars/accordion-component

Accordion component

  • 0.0.5
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
12
Weekly downloads
 
Created
Source

Accordion

Basic usage

<Accordion label="Accordion example">
  <Block as="p">...text</Block>
</Accordion>

Usage with parent state

const MultipleControlledAccordions = () => {
  const [active, setActive] = useState(-1);

  return (
    <>
      {times(4).map((d, i) => (
        <Accordion
          label={`Accordion example ${i + 1}`}
          key={i}
          onChange={() => setActive(i)}
          isOpen={i === active}
        >
          <Content />
        </Accordion>
      ))}
    </>
  );
};

Props

PropsTypeDescriptionRequiredDefault
labelstringLabel✔︎null
childrenjsxChildren for the Accordion's expandable content section✔︎null
onChangefuncCallback fired when accordion open state is changednull
extendobjectExtend styles of accordionnull
extendContentobjectExtend styles of accordion contentnull

FAQs

Package last updated on 04 Jun 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