🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

react-collapse-details

Package Overview
Dependencies
Maintainers
2
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-collapse-details

This component is an abstraction of a collapse, but using native HTML properties

1.0.17
latest
Source
npm
Version published
Weekly downloads
8
700%
Maintainers
2
Weekly downloads
 
Created
Source

react-collapse-details

React component for extra content

npm NPM

https://user-images.githubusercontent.com/33287490/138172984-83e1c7bc-717c-490a-a713-a1e7903451ad.mp4

How to install

Below are ways to install the library using npm or yarn:

npm i react-collapse-details
# ou
yarn add react-collapse-details

How to use default component

import DetailsCollapse from "react-collapse-details";

<DetailsCollapse summary="Lorem ipsum dolor sit">
  <p>
    Lorem ipsum dolor sit, amet consectetur adipisicing elit. Minima voluptates
    obcaecati
  </p>
</DetailsCollapse>;

How to use custom props component

import DetailsCollapse from "react-collapse-details";

<DetailsCollapse
  summary="Lorem ipsum dolor sit"
  width="60rem"
  bgColor="red"
  bgHover="blue"
  color="yellow"
  colorHover="pink"
  borderRadius="1em"
>
  <p>
    Lorem ipsum dolor sit, amet consectetur adipisicing elit. Minima voluptates
    obcaecati
  </p>
</DetailsCollapse>;

Properties

This component is an abstraction of a collapse, but using native HTML properties.

PropstyperequiredDescription
widthstring
summarystringX
childrenelementX
bgColorstringBackground color of summary
bgHoverstringBackground color hover of summary
colorstringColor of summary
colorHoverstringColor hover of summary
borderRadiusstringBorder radius of summary
borderstringBorder of summary
styleDetailsContentstringClass to style the content

Keywords

React

FAQs

Package last updated on 15 Nov 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