npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@codeweaver/wordart

v1.0.1

Published

A customizable, animated word art web component built with Svelte. Perfect for adding eye-catching text animations to your web applications.

Downloads

120

Readme

@codeweaver/wordart

A customizable, animated word art web component built with Svelte. Perfect for adding eye-catching text animations to your web applications.

WordArt Demo

Features

  • 🎨 Multiple stylish fonts from Google Fonts
  • 🌈 Customizable colors with smooth transitions
  • ⚡ Smooth wave animations
  • 📏 Adjustable size and animation speed
  • 🔠 Optional automatic uppercase conversion
  • 🎯 Zero dependencies (except Svelte)
  • 📦 Lightweight and performant
  • 🌐 Works in any web application

Installation & Usage

NPM Package

npm install @codeweaver/wordart
// Import in your JavaScript/TypeScript file
import "@codeweaver/wordart";

// Use in your HTML
<wordart-widget name="Hello World"></wordart-widget>;

Direct Script Usage

Method 1: UMD Build (Recommended for basic usage)

<!-- Load Svelte first -->
<script src="https://unpkg.com/svelte@4"></script>
<!-- Load our component -->
<script src="https://unpkg.com/@codeweaver/[email protected]/wordart.umd.js"></script>

<!-- Use the component -->
<wordart-widget
  name="Hello World"
  size="3"
  speed="2"
  color1="#ff3e00"
  color2="#40b3ff"
></wordart-widget>

Method 2: ES Module

<script type="module">
  import "@codeweaver/wordart/wordart.es.js";
</script>

<wordart-widget name="Hello World"></wordart-widget>

Method 3: Using specific version from CDN

<!-- Latest version -->
<script src="https://unpkg.com/@codeweaver/wordart"></script>

<!-- Specific version -->
<script src="https://unpkg.com/@codeweaver/[email protected]/wordart.umd.js"></script>

Framework Integration

Svelte

<script>
  import '@codeweaver/wordart';
</script>

<wordart-widget name="Hello Svelte!"></wordart-widget>

React

import "@codeweaver/wordart";

function App() {
  return (
    <wordart-widget name="Hello React!" size="3" speed="2"></wordart-widget>
  );
}

Vue

<template>
  <wordart-widget name="Hello Vue!" size="3" speed="2"></wordart-widget>
</template>

<script>
import "@codeweaver/wordart";

export default {
  name: "App",
};
</script>

Complete Example

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>WordArt Demo</title>
    <!-- Required Dependencies -->
    <script src="https://unpkg.com/svelte@4"></script>
    <script src="https://unpkg.com/@codeweaver/[email protected]/wordart.umd.js"></script>
  </head>
  <body>
    <h1>WordArt Demo</h1>

    <!-- Basic Usage -->
    <wordart-widget
      name="Hello World"
      size="3"
      speed="2"
      color1="#ff3e00"
      color2="#40b3ff"
      shouldConvertToUpperCase="false"
    ></wordart-widget>

    <!-- Interactive Example -->
    <script>
      // You can dynamically update properties
      const widget = document.querySelector("wordart-widget");

      // Update text after 2 seconds
      setTimeout(() => {
        widget.setAttribute("name", "Dynamic Update!");
        widget.setAttribute("color1", "#00ff00");
      }, 2000);
    </script>
  </body>
</html>

Properties

| Property | Type | Default | Description | | -------------------------- | ------- | ----------------------- | ----------------------------- | | name | string | "" | Text to be displayed | | size | string | "3" | Font size in rem units | | speed | string | "2" | Animation duration in seconds | | color1 | string | "#ff3e00" | Primary color | | color2 | string | "#40b3ff" | Secondary color | | font | string | "Rubik Doodle Shadow" | Font family | | shouldConvertToUpperCase | boolean | false | Convert text to uppercase |

Available Fonts

  • Rubik Doodle Shadow (default)
  • Bungee Shade
  • Nabla
  • Pixelify Sans
  • Rubik Vinyl

Font Dependencies

The widget uses Google Fonts. If you're using CSP (Content Security Policy), make sure to allow:

<link rel="preconnect" href="https://fonts.googleapis.com" />
<link
  rel="preconnect"
  href="https://fonts.gstatic.com"
  crossorigin="anonymous"
/>
<link
  href="https://fonts.googleapis.com/css2?family=Bungee+Shade&family=Nabla&family=Pixelify+Sans&family=Rubik+Doodle+Shadow&family=Rubik+Vinyl&display=swap"
  rel="stylesheet"
/>

Development

Clone and install dependencies:

git clone https://github.com/jaywalker21/wordart.git
cd wordart
npm install

Available scripts:

# Start development server with demo
npm run dev

# Build the library
npm run build:lib

# Build the demo site
npm run build:demo

# Preview the built demo
npm run preview:demo

# Type checking
npm run check

Project Structure

.
├── src/
│   ├── lib/               # Library source code
│   │   ├── WordArt.svelte # Main component
│   │   └── index.ts      # Library entry point
│   ├── demo/             # Demo site source
│   │   └── App.svelte    # Demo page
│   └── main.ts           # Demo entry point
├── dist/                 # Built library output
├── demo-dist/           # Built demo site
└── package.json

Demo

StackBlitz

Browser Support

Supports all modern browsers that implement the Custom Elements v1 specification:

  • Chrome
  • Firefox
  • Safari
  • Edge

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

MIT License - see the LICENSE file for details.

Credits


Made with ❤️ using Claude