
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.
A javascript library that splits text element into individual lines, words, or characters.
SplitBun is a lightweight JavaScript library that allows you to split text elements into individual lines, words, or characters with ease. This library is perfect for adding animation effects, creating typewriter-like text animations, or any other creative text manipulation you can imagine.
To use Text Splitter in your project, you can install it via npm.
npm i splitbun
Or, include the following
<script src="https://unpkg.com/splitbun"></script>
To use SplitBun, you need to select the text element you want to split and initialize it. Here's a basic example:
import splitBun from 'splitbun'
splitBun('#target',{
type: 'lines'
})
SplitBun(target, [options])
The target element(s) for the SplitBun call. This can be a selector string or a collection of elements (ie NodeList, jQuery object, or array).
| Name | Type | Description |
|---|---|---|
type | lines, words, or chars | Default to lines. splits text element into individual lines, words, or characters. |
onComplete | function | Function that will be executed after text splitting is completed. |
wrapperClass | string | Custom class for wrapper element |
innerClass | string | Custom class for inner element |
wrapperStyle | Partial<CSSStyleDeclaration> | Custom class for wrapper element |
innerStyle | Partial<CSSStyleDeclaration> | Custom class for inner element |
Here are a few examples of how you can use SplitBun:
splitBun("[text-split]", {
type: 'lines',
});
splitBun("[text-split]", {
type: 'words',
});
splitBun("[text-split]", {
type: 'chars',
});
splitBun("[text-split]", {
type: 'lines',
onComplete: () => {
console.log('split text completed)
},
});
splitBun("[text-split]", {
type: 'lines',
innerClass: 'text-slide-up'
});
Thank you for using SplitBun! We hope you find it helpful for your text animation and manipulation needs. If you have any questions or encounter issues, please don't hesitate to get in touch.
FAQs
A javascript library that splits text element into individual lines, words, or characters.
We found that splitbun demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 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
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.