百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
T

taggd

> 编程语言
开源

一个用于显示和添加图像标签的工具

380 stars0 点赞3 次浏览
访问官网GitHub

工具介绍

一个用于显示和添加图像标签的工具

DEPRECATED - Taggd

Taggd is a tool that allows you to tag pictures with additional information.

Deprecation Notice

This project isn't actively maintained. This means issues will not be answered and pull requests will not be accepted.

If you are reading this, please consider inheriting the repository. Please let me know by opening an issue.

Installation

  • Download the latest release
  • npm: npm install taggd
  • Bower: bower install taggd
  • cdnjs: https://cdnjs.com/libraries/taggd

Usage

You need to include the stylesheet in the -tag, and the script in the -tag. Both files are in the dist directory.

xml

The stylesheet has no default theme, so they will be dull default buttons ready for you to style!

xml

Finally, you can initialise taggd:

javascript
const image = document.getElementById('my-image');
const options = {};
const tags = [];

const taggd = new Taggd(image, options, tags);

The options parameter is a list of options. The tags parameter is a list of Tags. These are the buttons and popup that will render over your image. You can generate these using the Taggd tags generator.

Note on image styles

Taggd wraps the image the element in an element so the DOM Taggd adds is contained in a single element. Be cautious applying styles on the image that is used for Taggd.

xml

Would change into:

xml

If you want to position your element and use Taggd as an enhancement, you can style your image like so:

css
/*
Apply image styling to the Taggd container as well.
*/
img, .taggd {
  display: block;
  float: left;
  width: 50%;
}

/*
Reset images that are in a Taggd container.
*/
.taggd img {
  display: initial;
  float: initial;
  width: initial;
}

Note on import strategy

If you’re importing Taggd via the ES2015 syntax with a bundler that respects the module field in package.json, Taggd and Tag are exported separately:

javascript
import { Taggd, Tag } from 'taggd';

new Taggd(image, options, [
  new Tag(...),
]);

If you include the UMD bundle, Tag is part of the Taggd class:

javascript
new Taggd(image, options, [
  new Taggd.Tag(...),
]);

The former allows ES2015+ environments to use imports as intended. The latter prevents having to expose multiple classes.

If you have better ideas to have best of both worlds, please create an issue.

Documentation

For more information, check out the documentation.

License

The code is released under the MIT license.

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

JavaScript

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言