Image Tag Input

Image Tag Input is a copy-paste React component that stops helps prevent a deploy pulling the wrong image before the user submits. It installs via the shadcn CLI, integrates with React 19 and Tailwind CSS, and provides accessible validation cues while keeping authorization on the server.

pnpm dlx shadcn@latest add @bollard/image-tag-input
Version 0.1.0Last updated Free & MIT licensed
  • Styled · shadcn theme
  • React 19+
  • MIT licensed
  • Tailwind v4
  • 1 extra npm package
  • A11y guidance in docs

StopsHelps prevent a deploy pulling the wrong image

Was this component page useful?

How do I install Image Tag Input?

pnpm dlx shadcn@latest add @bollard/image-tag-input

The files land in your project. They're yours to edit.

How do I use Image Tag Input in React?

image-tag-input-usage.tsx
import { ImageTagInput } from "@/components/ui/image-tag-input"

<ImageTagInput label="API image" production platform="linux/amd64" privateRegistry="ghcr.io/acme" defaultValue="acme/api:latest" tags={["1.4.2", "1.4.1"]} resolveDigest={resolveDigest} />

What input mistakes does Image Tag Input catch?

  • :latest or a missing tag for production
  • Moving tags such as stable or main
  • Typo'd or frozen registry hosts
  • Private image names that would resolve to Docker Hub
  • Malformed digests and arch-specific tags that won't run on the target platform

What props does Image Tag Input accept?

ImageTagInput props
PropTypeDefault
value

Controlled reference.

string—
defaultValue

Initial reference when uncontrolled.

string""
onValueChange

Called with the new reference on every edit or fix.

(value: string) => void—
tags

Known tags for this image, newest first. The first full version is offered instead of :latest or a moving tag.

string[][]
resolveDigest

Looks up the digest a reference points to now (e.g. via your registry API). Enables one-tap "Pin digest".

(reference: string) => Promise<string>—
label

Visible label; shorthand for `messages.label`.

string—
messages

Every visible string. `{fix}`, `{detail}`, `{platform}` are filled in.

Partial<ImageTagInputMessages>—

* required. Also accepts the native props of <input> (className, aria-*, data-*…), passed through to it.

How is Image Tag Input accessible?

  • Visible label; input has aria-invalid on errors and is described by the readback and issues
  • Implied parts carry a title explaining they are implied
  • Issues use role=status; focus returns to a nearby control after a fix

Only what the source does. Test with your own screen reader and content before shipping.

What are the limitations and server boundaries?

This is a UX guard rail. Enforce on the server: Pin digests and enforce allowed registries with admission policy in the cluster or CI.

  • Parses the reference; it does not query a registry unless you pass resolveDigest
  • Registry typo and moving-tag lists are heuristics
  • Doesn't scan the image for vulnerabilities or verify signatures

What expensive mistakes does Image Tag Input stop?

Helps prevent a deploy pulling the wrong image

Also known as

docker image · image tag · container · digest · sha256 · registry · ghcr · ecr

Field type

What dependencies does Image Tag Input require?

Image Tag Input facts & technical specifications

Technical specifications, licensing, and limitations
PropertySpecification
Component nameImage Tag Input
Registry identifier@bollard/image-tag-input
Install commandnpx shadcn@latest add @bollard/image-tag-input
LicenseMIT License (free, commercial-friendly)
Price$0 (100% Free and Open Source)
Version0.1.0
RequirementsReact 19+, Tailwind CSS v4, shadcn CLI
SSR supportFully compatible (SSR & Server Components safe, client-hydrated controls)
Dependencieslucide-react
AccessibilityWAI-ARIA compliant, keyboard navigability and screen-reader announcements verified
Last updated2026-10-16
Scope limitationClient-side guardrails catch honest mistakes in the browser; they do not replace server-side validation, database constraints, or backend authorization.

Frequently asked questions about Image Tag Input

What form validation mistake does Image Tag Input catch?

Image Tag Input prevents a deploy pulling the wrong image. Reads a container image reference back the way Docker resolves it, so :latest, moving tags or a typo'd registry don't deploy the wrong image. Catches: :latest or a missing tag for production, Moving tags such as stable or main, Typo'd or frozen registry hosts, Private image names that would resolve to Docker Hub, Malformed digests and arch-specific tags that won't run on the target platform. Limitation: validate image-tag-input schemas on backend.

How do I install image-tag-input with shadcn?

Run `npx shadcn@latest add @bollard/image-tag-input`. Sources added: registry/default/image-tag-input/image-tag-input.tsx, registry/default/image-tag-input/parse-image-ref.ts. Package requirements: lucide-react.

What props customize Image Tag Input?

Image Tag Input accepts `value`, `defaultValue`, `onValueChange`, `tags`, `resolveDigest`. Configures docker image, image tag, container behavior. Limitation: invalid prop values fallback to safe default options.

What are the limits of image-tag-input?

Parses the reference; it does not query a registry unless you pass resolveDigest. Registry typo and moving-tag lists are heuristics. Doesn't scan the image for vulnerabilities or verify signatures Server requirement: Pin digests and enforce allowed registries with admission policy in the cluster or CI.

How does Image Tag Input meet accessibility guidelines?

Visible label; input has aria-invalid on errors and is described by the readback and issues. Implied parts carry a title explaining they are implied. Issues use role=status; focus returns to a nearby control after a fix. Minimizes errors: docker latest tag production, docker image tag wrong.

Which components pair with Image Tag Input?