
Product
Socket Now Supports pylock.toml Files
Socket now supports pylock.toml, enabling secure, reproducible Python builds with advanced scanning and full alignment with PEP 751's new standard.
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 53 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.
Product
Socket now supports pylock.toml, enabling secure, reproducible Python builds with advanced scanning and full alignment with PEP 751's new standard.
Security News
Research
Socket uncovered two npm packages that register hidden HTTP endpoints to delete all files on command.
Research
Security News
Malicious Ruby gems typosquat Fastlane plugins to steal Telegram bot tokens, messages, and files, exploiting demand after Vietnam’s Telegram ban.