
Security News
NIST Under Federal Audit for NVD Processing Backlog and Delays
As vulnerability data bottlenecks grow, the federal government is formally investigating NIST’s handling of the National Vulnerability Database.
react-collapsible-paragraph
Advanced tools
A collapsible paragraph component for reactjs projects
A Collapsible Paragraph Component for Reactjs
Customizable expan/collapse handler
yarn add react-collapsible-paragraph
# or
npm install react-collapsible-paragraph
import React from "react";
import Collapsible from "react-collapsible-paragraph";
function App() {
return (
<div style={{ lineHeight: "22px" }}>
<Collapsible lines={2}>
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim
veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea
commodo consequat.
</Collapsible>
</div>
);
}
Collapsible
inherits its parentElement's lineHeight
which is necessay for the collapse mechanism. Therefore, parent must provide lineHeight
propertyProps | Types | Expanation | Default |
---|---|---|---|
lines | number | If the content is longer than a certain line number. The content can be collapsed | 2 |
locales | {expand: string; collapse: string} | Locale for expan/collapse handler based on controlled usage | {expand: "expand", collapse: "collapse"} |
FAQs
A collapsible paragraph component for reactjs projects
The npm package react-collapsible-paragraph receives a total of 25 weekly downloads. As such, react-collapsible-paragraph popularity was classified as not popular.
We found that react-collapsible-paragraph 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
As vulnerability data bottlenecks grow, the federal government is formally investigating NIST’s handling of the National Vulnerability Database.
Research
Security News
Socket’s Threat Research Team has uncovered 60 npm packages using post-install scripts to silently exfiltrate hostnames, IP addresses, DNS servers, and user directories to a Discord-controlled endpoint.
Security News
TypeScript Native Previews offers a 10x faster Go-based compiler, now available on npm for public testing with early editor and language support.