ltv-logo-js
v2.0.0
Published
LTV animated logo for plain JavaScript / TypeScript (SVG string, DOM element and <ltv-logo> web component)
Maintainers
Readme
ltv-logo-js
The animated LTV logo for plain JavaScript / TypeScript: an
SVG string renderer, a DOM element factory, an <ltv-logo> web component and
a <script> bundle. No dependencies.
npm i ltv-logo-jsWeb component
<script src="https://unpkg.com/ltv-logo-js"></script>
<ltv-logo size="5" animation="greet"></ltv-logo>With a bundler:
import { defineLtvLogoElement } from 'ltv-logo-js';
defineLtvLogoElement(); // registers <ltv-logo>Attributes: mark, size (1–10), animation, tone, label.
DOM
import { mountLogo, createLogoElement, updateLogoElement } from 'ltv-logo-js';
const svg = mountLogo('#app', { size: 3, animation: 'greet' });
updateLogoElement(svg, { size: 8, animation: 'float' });String / SSR
import { renderLogo, styles } from 'ltv-logo-js';
const html = `<style>${styles}</style>${renderLogo({ size: 5, animation: 'work' })}`;Or import the stylesheet: import 'ltv-logo-js/style.css'.
Options
mark—converge(Hội tụ, default) orlegacy(the 1.x L·T·V mark)size—1…10, default5(converge: size × 16 px)tone— converge only:color(default),dark,mono,whiteanimation— converge:assemble(default),idle,greet,cheer,work,hover,none; legacy:pulse(default),assemble,float,intro,wave,hover,nonetitle— accessible name, default"LTV";""hides it from assistive techclassName— extra classes
See the repository README for the animation guide and theming.
