![PyPI Now Supports iOS and Android Wheels for Mobile Python Development](https://cdn.sanity.io/images/cgdhsj6q/production/96416c872705517a6a65ad9646ce3e7caef623a0-1024x1024.webp?w=400&fit=max&auto=format)
Security News
PyPI Now Supports iOS and Android Wheels for Mobile Python Development
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
reactjs-accordion-ui
Advanced tools
reactjs-accordion-ui
is a customizable and lightweight ReactJS accordion component that allows you to easily create collapsible sections of content.
you can download this using npm using below command.
npm install reactjs-accordion-ui
or using yarn
yarn add reactjs-accordion-ui
Note: Please use latest version.
The required prop is items which is as shown below
import React from 'react';
import {ReactAccordion} from 'reactjs-accordion-ui';
const MyApp = () => {
const items = [
{ title: 'Section 1', content: 'Content for section 1' },
{ title: 'Section 2', content: 'Content for section 2' },
{ title: 'Section 3', content: 'Content for section 3' },
];
return (
<ReactAccordion items={items} />
);
};
export default MyApp;
you can pass the props defined in option section as per your requirement
import React from 'react';
import {ReactAccordion} from 'reactjs-accordion-ui';
const MyApp = () => {
const items = [
{ title: 'Section 1', content: 'Content for section 1' },
{ title: 'Section 2', content: 'Content for section 2' },
{ title: 'Section 3', content: 'Content for section 3' },
];
return (
<ReactAccordion items={items} width={"700px"} headerBackgroundColor={'#0f0'} />
);
};
export default MyApp;
you can also give a div
to content prop as shown below.
import React from 'react';
import {ReactAccordion} from 'reactjs-accordion-ui';
const MyApp = () => {
const items = [
{ title: 'Section 1', content: <div>Hi</div> },
{ title: 'Section 2', content: 'Content for section 2' },
{ title: 'Section 3', content: 'Content for section 3' },
];
return (
<ReactAccordion items={items} width={"700px"} headerBackgroundColor={'#0f0'} />
);
};
export default MyApp;
The ReactAccordion
component accepts the following props:
Option | type | Description |
---|---|---|
items | Array | An array of objects representing the accordion items. Each object should have a title type(string) and content (type ReactNode) property. |
width | string | The width of the accordion component. |
headerBackgroundColor | string | The background color of the accordion header. |
contentBackgroundColor | string | The background color of the accordion content. |
colapseIcon | ReactNode | The icon display when an accordion item is expanded |
expandIcon | ReactNode | The icon content to display when an accordion item is collapsed |
id | string | The value represents the id attribute of the ReactAccordion component |
We welcome contributions! If you'd like to contribute to reactjs-toggleswitch, please follow our Contribution Guidelines.
This project is licensed under the MIT License - see the LICENSE file for details.
FAQs
A accordition component created using react and typescript
The npm package reactjs-accordion-ui receives a total of 1 weekly downloads. As such, reactjs-accordion-ui popularity was classified as not popular.
We found that reactjs-accordion-ui demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.