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

react-accordion-new

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

react-accordion-new

Accordion component for React.

  • 1.1.0
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
2
Maintainers
1
Weekly downloads
 
Created
Source

React Accordion Box

Accordion component for React.

Sample Picture

Install module

> npm i react-accordion-new

Usage

import React from 'react';
import ReactAccordion from 'react-accordion-new';

class Example extends React.Component {
    constructor(props) {
        super(props);
    }
    render() {
        const elements = [
            {title:'test 1', content:'<h1>Heading 1</h1>'},
            {title:'test 2', content:'gaurav 2'}, 
            {title:'test 3', content:'gaurav'}
        ];
        return (
            <div>
                <ReactAccordion elements={elements} />
            </div>
        )
    }
}

Options/Props

The ReactAccordion component accepts the following props:

{
  elements: [],//Required
  default: false //Optional
}
  • Elements

    • Required Prop
    • Each entry refers to children of the accordion
    • Array of Objects with following keys:-
      • title : Text for the title of the child
      • content : Content string of the child
  • default

    • Optional Prop
    • Default to false
    • If true then first child is expanded by default

FAQs

Package last updated on 01 May 2018

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