0.1.2 • Published 5 years ago

v-splitter v0.1.2

Weekly downloads
12
License
-
Repository
gitlab
Last release
5 years ago

v-splitter

Inspired by the library Splitting JS and the easy animation it provides as shown in this Courstro video.

The VSplitter component takes just one "prop" called text and will split (into <span>s) the passed text into words, characters and spaces. In addition it provides the following css variables that might be useful for css styling:

  --word-index: index of the <span> of the word
  --char-index: index of the character within the given word
  --abs-index: index of the character across all words

as well as classes:

  v-splitter__word: <span> containing a word
  v-splitter__char: <span> containing a char
  v-splitter__space: <span> containing a space (also has 'char')

The solution to the dynamic CSS variables was figured out via this post.

Splitting JS: https://splitting.js.org/

Project setup

npm install

Compiles and hot-reloads for development

npm run serve

Compiles and minifies for production

npm run build

Run your tests

npm run test

Lints and fixes files

npm run lint

Run your unit tests

npm run test:unit

Customize configuration

See Configuration Reference.

0.1.2

5 years ago

0.1.1

6 years ago

0.1.0

6 years ago