
Security News
Deno 2.6 + Socket: Supply Chain Defense In Your CLI
Deno 2.6 introduces deno audit with a new --socket flag that plugs directly into Socket to bring supply chain security checks into the Deno CLI.
@b-design/ui-truncate
Advanced tools
用于截断超长文本。
比较常见的使用方式: $XView
根据容器的宽度自动截断: $XView
在宽度截断模式下,可以截断任何可渲染元素,不只是 string: $XView
可以自定义省略符号。不过注意,如果省略符号不是...的话,会在宽度截断模式下造成“字符在中间被截断”(在浏览器中没办法支持那么“智能”的截断):
$XView
每当 children 变化的时候,Truncate 会自动检查是否需要截断: $XView
可以自定义 tootip 的 max-width: $XView
设置 tooltip 样式: $XView
想要做多行截断的时候,先考虑能否通过普通的滚动来让用户浏览全部内容。从用户体验的角度来看,后者的体验更好,无需使用多行截断。
单行截断:
多行截断:
FAQs
React component for Alibaba Cloud.
The npm package @b-design/ui-truncate receives a total of 3 weekly downloads. As such, @b-design/ui-truncate popularity was classified as not popular.
We found that @b-design/ui-truncate demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 8 open source maintainers 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
Deno 2.6 introduces deno audit with a new --socket flag that plugs directly into Socket to bring supply chain security checks into the Deno CLI.

Security News
New DoS and source code exposure bugs in React Server Components and Next.js: what’s affected and how to update safely.

Security News
Socket CEO Feross Aboukhadijeh joins Software Engineering Daily to discuss modern software supply chain attacks and rising AI-driven security risks.