Launch Week Day 2: Introducing Reports: An Extensible Reporting Framework for Socket Data.Learn More
Socket
Book a DemoSign in
Socket

react-accordion-customizable

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-customizable

React Accordion Customizable

latest
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

react-accordion-customizable

React Accordion Customizable

Simple Customizable React Accordion Component

Example

Example

Github

https://github.com/georgeCXG/react-accordion-customizable

Install

npm install --save react-accordion-customizable

Usage

import { Accordion } from 'react-accordion-customizable';

const Component = () => {
    return (
        <div>
            <Accordion onChangeStatus={(status) => setState(status)}>
                <Accordion.Item label="Label_1">
                    <Component />
                </Accordion.Item>
                <Accordion.Item label="Label_2">
                    <Component />
                </Accordion.Item>
            </Accordion>
        </div>
    );
};

Props

Accordion Props

nametypedefaultdescription
multipleOpenBooleanfalseOpen multiple Accordions at the same time
onChangeStatusFunction(status) => void;Call when status of accordion changed
initialOpenArray[null]On load accordion is open. It can be multiple accordions e.g. [0,1,2]

Accordion Item PROPS

nametypedefaultdescription
labelStringThe name of the label
labelPositionString'start'Justify position, options ['start','end','between','center']
labelReverseBooleanfalseReverse the inital position
iconsLeftArray[null]Multiple icons on the left side as [JSX,JSX]
iconsRightArray[null]Multiple icons on the right side as [JSX,JSX]
iconSizeNumber20Size of the initial icon
secondaryIconJSX.ElementnullSecondary Icon
removeDefaultIconBooleanfalseRemove the initial default icon
removeAnimationBooleanfalseRemove the default animation
transitionAnimationNumber200Duration of the animation in MS
removeAnimationIconBooleanfalseRemove the initial animation on default icon
styleCSSnullAdds styling on item accordion

License

react-accordion-customizable is released under the MIT license.

FAQs

Package last updated on 25 Jun 2022

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