Urgent.News

What's breaking now, across thousands of outlets.

Tech

I Finally Published My First NPM Package! ๐ŸŽ‰

Hello everyone ๐Ÿ‘‹ Iโ€™m really happy to finally share my first NPM package: taglite ๐Ÿš€ This package started from a simple need in one of my projects. I needed a Tag Input component, so I tried several different libraries. Each one had its own limitations. Some were missing features I needed, while others werenโ€™t flexible enough to customize the way I wanted. So I decided to build my own. As I keptโ€ฆ

Hello everyone! I'm thrilled to announce that I've published my very first NPM package, taglite. This package was born from a simple need in one of my projects - a Tag Input component. After trying various libraries, each with its limitations, I decided to build my own. As I used it more, I kept adding features and improvements, eventually deciding to share it with others. taglite is a lightweight Tag Input component for React, designed with a simple API while still providing commonly needed features in real-world projects.

Its features include zero runtime dependencies, full TypeScript support, adding tags with Enter and custom keys like Tab, copy & paste support, tag normalization and validation, preventing duplicate tags, limiting the number of tags, custom placeholder and hintText, read-only and disabled modes, built-in themes, support for custom icons, and callbacks for adding and removing tags.

I'm also working on a new feature that will allow custom color and appearance using a prop. This is my first experience building and publishing an NPM package, and the process was incredibly enlightening, from package structuring and API design to testing, building, writing documentation, and finally publishing. This is the first version, and there's still room for improvement. I welcome your feedback and encourage you to give taglite a try. You can find it on npm and GitHub.

Written by urgent.news from Dev.to's reporting โ€” not their text. Machine-written โ€” may contain errors; check the original before relying on it.

Read the original at dev.to โ†’

More in Tech

Why Timestamps Lie in Distributed Systems (and How Logical Clocks Fix It)

There's a line of code in almost every service that stores replicated data: def resolve ( incoming , stored ): # keep whichever write is "newer" return incoming if incoming . timestamp > stored .

  • Timestamps lie in distributed systems, leading to last-write-wins (LWW) corruption
  • Lamport clocks introduce causal order using integer per process, resolving conflicts

A Dialog Can Now Be a Native Desktop Window

Last week's native-window release could open an editor, inspector, and tool palette as separate operating-system windows.

  • Dialogs can now function as native desktop windows in Codename One framework.
  • Dialog.setDefaultNativeWindowMode(true) enables dialog to be a native window.
  • Transition handling and accessibility state preserved across Windows and Mac platforms.

More from Saturday 12 September โ†’