
Security News
MCP Community Begins Work on Official MCP Metaregistry
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
react-sanfona
Advanced tools
React accordion component
Install via NPM:
npm install react-sanfona
Then:
import { Accordion, AccordionItem } from 'react-sanfona';
…
render() {
return (
<Accordion>
{[1, 2, 3, 4, 5].map(item => {
return (
<AccordionItem title={`Item ${item}`} expanded={item === 1}>
<div>
{`Item ${item} content`}
</div>
</AccordionItem>
);
})}
</Accordion>
);
}
…
Property | Type | Description | Default |
---|---|---|---|
allowMultiple | Boolean | Allow multiple items to be open at the same time. | false |
isHovered | Boolean | Allow expanding an element after the mouse hovers an item. | false |
openNextAccordionItem | Boolean | Opens the next accordion item after the previous one is closed. Defaults first one as active and applies for each accordion item except the last one. | false |
className | String | Custom classname applied to root element | null |
style | Object | Inline styles applied to root element | null |
onChange | Function | Triggered when component updates and passes new state as an argument | null |
rootTag | String | Custom HTML tag used for root element | 'div' |
duration | Number | Open/close transition duration in milliseconds | 300 |
easing | String | Open/close transition easing | 'ease' |
Property | Type | Description | Default |
---|---|---|---|
title | String / Object | Text or Object to display in header. | null |
expanded | Boolean | If item body should be expanded or not | false |
onExpand | Function | Callback for when item is expanded | null |
onClose | Function | Callback for when item closes | null |
className | String | Custom classname applied to root item element | null |
bodyClassName | String | Custom classname applied to the accordion item body | null |
expandedClassName | String | Custom classname applied when accordion is expanded | null |
titleClassName | String | Custom classname applied to accordion item header text | null |
disabled | Boolean | If item should be disabled or not | false |
disabledClassName | String | Custom classname applied to accordion item header text when item is disabled | null |
rootTag | String | Custom HTML tag used for root element | 'div' |
titleTag | String | Custom HTML tag used for title element | 'h3' |
bodyTag | String | Custom HTML tag used for body element | 'div' |
duration | Number | Open/close transition duration in milliseconds | 300 |
easing | String | Open/close transition easing | 'ease' |
Classname | Targets |
---|---|
react-sanfona | Accordion container |
react-sanfona-item | AccordionItem container |
react-sanfona-item-expanded | AccordionItem container when expanded |
react-sanfona-item-title | AccordionItem header text |
react-sanfona-item-body | AccordionItem body container |
react-sanfona-item-body-wrapper | AccordionItem body children wrapper |
react-sanfona-item-disabled | AccordionItem is disabled |
npm install
npm start // served on localhost:8080
npm test
FAQs
React accessible accordion component
The npm package react-sanfona receives a total of 575 weekly downloads. As such, react-sanfona popularity was classified as not popular.
We found that react-sanfona demonstrated a not healthy version release cadence and project activity because the last version was released 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
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
Research
Security News
Socket uncovers an npm Trojan stealing crypto wallets and BullX credentials via obfuscated code and Telegram exfiltration.
Research
Security News
Malicious npm packages posing as developer tools target macOS Cursor IDE users, stealing credentials and modifying files to gain persistent backdoor access.