New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-performant-collapsible

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-performant-collapsible

A performant React.js Collapsible component

  • 0.2.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

react-performant-collapsible

A performant React.js Collapsible component.

Demo

Why it's performant?

It doesn't repaint at all during the collapse/expand animation (It only repaint once at the beginning of the animation and once at the end of the animation): Doesn't Repaint

Installation

npm i react-performant-collapsible

or

yarn add react-performant-collapsible

or

pnpm i react-performant-collapsible

Props

Prop NameTypeRequiredNote
classNameStringfalseclassName for the wrapper element
styleObjectfalsestyle for the wrapper element
horizontalBooleanfalseif it is horizontal. default: false
maskColorStringfalsebackground color for the mask element
animationDurationStringfalsehow long does the collapse/expand animation take. format is like 1s or 400ms, same as CSS property transition-duration
animationTimingFunctionStringfalseformat is like linear or cubic-bezier(.29, 1.01, 1, -0.68), same as CSS property transition-timing-function
collapsibleBooleantrueis currently collapsed or not
childrenReact Nodetrue

What is props maskColor used for?

Sometimes if the background color is not white, you need to set the maskColor to match the background color, e.g.

<div style={{background: 'red'}}>
  <Collapsible collapsible={state.collapsible} maskColor="red">
    { someChildren }
  </Collapsible>
</div>

Keywords

FAQs

Package last updated on 04 Dec 2021

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