
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
React component that truncates text with ellipsis and shows tooltip only when content overflows.
Smart truncate + tooltip component for React 18+.
Built on top of react-tooltip-z.
Automatically truncates text with ellipsis only when needed and shows tooltip when content overflows.
text-overflow: ellipsisPerfect for:
npm install rc-tc-ifn
import TooltipIfn from "rc-tc-ifn";
export function Example() {
return (
<TooltipIfn width={120} placement="right">
Very long content here that might overflow
</TooltipIfn>
);
}
If the content exceeds 120px → it will truncate and show tooltip.
If not → it renders normally (no tooltip).
<TooltipIfn
width="150px"
content="Custom tooltip content"
placement="top"
>
Long text here...
</TooltipIfn>
All tooltip-related props are inherited from react-tooltip-z
(except trigger and open, which are internally controlled).
| Prop | Type | Default | Description |
|---|---|---|---|
children | ReactNode | — | Target element |
content | string | ReactNode | children | Tooltip content |
width | string | number | — | Width applied to truncated child |
wrapperWidth | string | number | — | Width applied to wrapper |
tagName | string | "span" | Wrapper tag |
truncateClassName | string | — | Custom class for truncated element |
...rest | any | — | Forwarded to react-tooltip-z props |
trigger and open props are disabled (hover-only behavior).ref (DOM or forwardRef component).| Criteria | rc-tc-ifn | Manual Implementation |
|---|---|---|
| Smart overflow check | ✅ | ❌ |
| Tooltip only if needed | ✅ | ❌ |
| Portal support | ✅ | ⚠️ |
| API simplicity | ✅ | ❌ |
| Setup time | ✅ | ❌ |
Notes
MIT
FAQs
React component that truncates text with ellipsis and shows tooltip only when content overflows.
The npm package rc-tc-ifn receives a total of 25 weekly downloads. As such, rc-tc-ifn popularity was classified as not popular.
We found that rc-tc-ifn demonstrated a healthy version release cadence and project activity because the last version was released less than 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.