shuffle-text-c
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

shuffle-text-c

A component that allows you to shuffle text, by simply set a tag.

日本語 | ENGLISH


<script src="https://unpkg.com/shuffle-text-c/dist/esm/shuffle-text.js" type="module"></script>

<shuffle-text text="text to be displayed" />

Demo

demo

Usages

Script tag

  • Set a script tag like this. <script src="https://unpkg.com/shuffle-text-c/dist/esm/shuffle-text.js" type="module"></script>
  • Call <shuffle-text /> at any place.

npmjs

  • Install it with npm install shuffle-text-c
  • Call the loader as follows.

Vue

<script>
  import { applyPolyfills, defineCustomElements } from "shuffle-text-c/loader";

  applyPolyfills().then(() => {
    defineCustomElements();
  });

  //...
<templeate>
  <div>
    <shuffle-text text="text to be displayed" />
  </div>
</templeate>

React

import { applyPolyfills, defineCustomElements } from "shuffle-text-c/loader";

applyPolyfills().then(() => {
  defineCustomElements();
});

export default function App() {
  return (
    <div>
      <shuffle-text text="text to be displayed" />
    </div>
  );
}

Configs

Property Attribute Description Type Default Required
text text text to be displayed string Yes
emptyChars empty-chars Fill-in-the-blank character string '-' No
hover hover re-rendering on hover boolean false No
openTime open-time The time it takes for text to be inserted. number 1000 No
randomChars random-chars Randomly inserted characters string 'ABCDEFGHIJKLMNOPQRSTUVWXYZ?!#$%&()=~-|' No
timeOut time-out One shuffle time number 10 No

License

MIT ©ivgtr

Github Follow MIT License Donate

Readme

Keywords

none

Package Sidebar

Install

npm i shuffle-text-c

Weekly Downloads

94

Version

1.1.0

License

MIT

Unpacked Size

284 kB

Total Files

39

Last publish

Collaborators

  • ivgtr