
Security News
High Salaries No Longer Enough to Attract Top Cybersecurity Talent
A survey of 500 cybersecurity pros reveals high pay isn't enough—lack of growth and flexibility is driving attrition and risking organizational security.
@snack-uikit/truncate-string
Advanced tools
npm i @snack-uikit/truncate-string
<TruncateString
variant='end'
placement='top'
hideTooltip={true}
text={'Текст'}
maxLines={2}
/>
name | type | default value | description |
---|---|---|---|
text* | string | - | Текст, который будет обрезаться |
variant | "middle" | "end" | end | Вариант обрезания строки: - End - с конца - Middle - по середине |
className | string | - | CSS-класс |
hideTooltip | boolean | - | Скрывать ли тултип с полным текстом |
maxLines | number | - | Максимальное кол-во строк, до которого может сворачиваться текст. |
placement | enum Placement: "left" , "left-start" , "left-end" , "right" , "right-start" , "right-end" , "top" , "top-start" , "top-end" , "bottom" , "bottom-start" , "bottom-end" | - | Положение тултипа относительно обрезанного текста. |
Если компонент работает некорректно, проверь:
<TruncateString />
должен лежать в органиченном по ширине контейнере,
иначе он не сможет правильно высчитывать обрезание.FAQs
Unknown package
We found that @snack-uikit/truncate-string demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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
A survey of 500 cybersecurity pros reveals high pay isn't enough—lack of growth and flexibility is driving attrition and risking organizational security.
Product
Socket, the leader in open source security, is now available on Google Cloud Marketplace for simplified procurement and enhanced protection against supply chain attacks.
Security News
Corepack will be phased out from future Node.js releases following a TSC vote.