Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
ng-gx-split-text
Advanced tools
This is a utility for Angular, allowing you to split the text into words and chars, for subsequent animation
NG-GX-SPLIT-TEXT - This is an Angular utility to split text into words, lines or chars for subsequent animations.
You can familiarize yourself with the demo version here - DEMO
Angular | ng-gx-split-text |
---|---|
>=8.0.0 <9.0.0 | v0.0.x |
ng-gx-split-text
:npm install ng-gx-split-text
import { NgGxSplitTextModule } from 'ng-gx-split-text';
@NgModule({
declarations: [
AppComponent,
],
imports: [
NgGxSplitTextModule,
],
bootstrap: [AppComponent]
})
export class AppModule {}
<p #text ngGxSplitText>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Accusamus amet consequuntur culpa
delectus, doloribus exercitationem ipsam, laudantium molestiae non numquam odit omnis optio praesentium quae ratione
similique sit soluta voluptatem?</p>
@ViewChild('text', { static: true, read: NgGxSplitTextDirective }) text: NgGxSplitTextDirective;
export class AppComponent implements AfterViewInit {
@ViewChild('text', {static: true, read: NgGxSplitTextDirective}) text: NgGxSplitTextDirective;
tlText = new TimelineMax();
constructor() {}
ngAfterViewInit(): void {
this.textAnimation();
}
textAnimation() {
this.tlText
.to(this.text.words, 0.5, {
opacity: 0,
})
.staggerFromTo(this.text.words, 0.5, {
opacity: 0,
x: () => {
return _.random(-100, 100);
},
y: () => {
return _.random(-100, 100);
},
rotation: () => {
return _.random(-25, 25);
},
immediateRender: false,
}, {
opacity: 1,
x: 0,
y: 0,
rotation: 0,
}, 0.03);
}
}
#DEMO
Name | Description |
---|---|
NgGxSplitText | Split your text (all options is default) |
[NgGxSplitText] | Split your text (custom options ) |
Name | Type | Default | Description |
---|---|---|---|
defer | boolean | false | Defer initiation (for manual initiation use initSplit() ) |
<p #text ngGxSplitText>Lorem ipsum dolor...</p> // Default options
<p #text [ngGxSplitText]="{defer: true, ...}">Lorem ipsum dolor...</p> // Custom options
Name | Type | Description |
---|---|---|
isInit | boolean | Is Split Text applied |
nativeElement | HTMLElement | Container HTMLElement |
words | HTMLElement[] | Words HTMLElement array |
chars | HTMLElement[] | Chars HTMLElement array |
line-words | HTMLElement[][] | Line array with words HTMLElement array |
line-chars | HTMLElement[][] | Line array with chars HTMLElement array |
this.text.isInit // console.log(true);
this.text.srcText // console.log(Lorem ipsum dolor...);
Name | Description |
---|---|
initSplit() | Initialize Split Text (For using in case defer: true ) |
resetSplit() | Reset to source text |
ngAfterViewInit(): void {
// if Split Text already initialized (defer: false)
this.text.initSplit(); // Return WARNING! Text already initialized
// if Split Text not initialized (defer: true)
this.text.initSplit(); // It's OK!
}
FAQs
This is a utility for Angular, allowing you to split the text into words and chars, for subsequent animation
The npm package ng-gx-split-text receives a total of 0 weekly downloads. As such, ng-gx-split-text popularity was classified as not popular.
We found that ng-gx-split-text demonstrated a not healthy version release cadence and project activity because the last version was released 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
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.