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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@lovable.dev/ai-disclosure

v0.1.0

Published

Official EU AI transparency icons (AI Act Article 50 labelling) as React components

Readme

@lovable.dev/ai-disclosure

The official EU icons for labelling AI-generated content as a React component, for disclosing AI-generated or AI-manipulated content under the AI Act (Article 50) transparency rules.

The SVGs are the unmodified official set published by the European Commission (Section 2 of the Code of Practice on marking and labelling of AI-generated content), converted to inline-styled React components so multiple variants can coexist on one page.

Usage

AIDisclosureIcon is the package's single entry point.

import { AIDisclosureIcon } from "@lovable.dev/ai-disclosure";

// Basic icon — AI was involved, or paired with a custom text label
<AIDisclosureIcon />

// Fully AI-generated content (no human-created elements or editorial control)
<AIDisclosureIcon type="ai-generated" />

// Human-made content partially modified with AI, white 50%-transparent variant
<AIDisclosureIcon type="ai-modified" color="white" transparent />

| Prop | Type | Default | Notes | | --- | --- | --- | --- | | type | "ai" \| "ai-generated" \| "ai-modified" | "ai" | Which official icon to render | | color | "black" \| "white" | "black" | The two official color variants | | transparent | boolean | false | The official 50%-transparency variants | | size | number | 20 (26 for corner placements) | Artwork height in px | | placement | "inline" \| "top-left" \| "top-right" \| "bottom-left" \| "bottom-right" | "inline" | Render inline, or overlay a corner of the parent element | | containerRadius | number \| "circle" | 0 | The parent's border-radius in px, or "circle" for a circular parent such as an avatar (corner placements) | | padding | number \| "inside" \| "on-border" | "inside" | "inside" keeps a gap of 15% of size to the nearest parent boundary, a number sets that gap in px, "on-border" centers the icon on the boundary (corner placements) | | ...rest | SVGProps<SVGSVGElement> | | Spread onto the <svg>, so className, aria-label, etc. override defaults |

The component ships a default role="img" + aria-label per the EU accessibility guidance; override aria-label to match your context.

Corner placements

Pass a corner placement to overlay a corner of the parent element without affecting layout — the icon positions absolutely, and a statically-positioned parent is given position: relative so it becomes the anchor:

<div className="testimonial-card">
  …
  <AIDisclosureIcon placement="bottom-right" containerRadius={16} />
</div>

<div className="avatar">
  <img … />
  <AIDisclosureIcon placement="bottom-right" padding="on-border" containerRadius="circle" />
</div>

With padding: "inside" (or a number), the icon keeps that gap to the nearest parent boundary. On rounded corners it slides inward just enough to clear the curve; the pill-shaped labels always keep the gap to the top/bottom edge and only shift sideways when the corner curve demands it. On a circular container the pill is centered horizontally.

containerRadius must be the effective rendered radius: CSS shrinks a border-radius larger than the box allows (e.g. 96 on a 130px-tall box renders as 65), so pass what actually renders — or "circle" for circular parents.

With padding: "on-border", the icon is centered on the parent's boundary: the round icon sits on the corner curve (on a circular container, on the circle's edge), and the pill-shaped labels straddle the top/bottom edge just past the curve. On a circular container the pill straddles the rim's top/bottom point, centered horizontally.

Sizing

The EU does not mandate a pixel size — the requirement is that the icon is "clearly perceivable and distinguishable" and "in a clearly visible size" at first exposure to the content. The 20px default is this package's choice, not an EU rule. size is the height of the visible artwork, so equal sizes render equal visual heights across all variants. Placement rules (no overlays on top, embedded so it survives reshare/download, visible at first exposure) are summarized on the official page linked above.

Raw SVGs

The unmodified official white variants are shipped under svg/ (e.g. @lovable.dev/ai-disclosure/svg/ai-generated-white.svg) for use outside React; they are also the geometry source for the bundled icon data (which crops their viewBoxes to the artwork). The color variants differ only in fills and badge opacity, which the React component applies at render time.