GLS Registry

Label Card

A Parcel Shop label pack row with usage progress or a status badge.

  • PS200 - PS3999

    Activada el 7 may 2026

    73%366/500 usadas
  • PS4000 - PS4499

    Consumido el 7 may 2026

    Consumido
  • PS4500 - PS4999

    Desactivada el 6 may 2026

    Desactivada

Installation

npx shadcn@latest add @ecodeliver/label-card

Usage

Pass a label pack. For an active pack, onMarkConsumed fires with the pack id when the consume action is pressed. Consumed and disabled packs show a badge instead.

import { LabelCard } from "@/components/registry/label-card";

export function Example() {
  return (
    <LabelCard
      label={{
        id: "lbl-001",
        rangeFrom: "PS200",
        rangeTo: "PS3999",
        status: "active",
        updatedAt: "2026-05-07T10:00:00.000Z",
        used: 366,
      }}
      onMarkConsumed={(id) => console.log(id)}
    />
  );
}

packSize defaults to 500 and is used for the usage percentage.

API Reference

LabelCard

PropTypeDefault
labelLabel-
onMarkConsumed(id: string) => void-
packSizenumber500
classNamestring-

Label

PropTypeDefault
idstring-
rangeFromstring-
rangeTostring-
status"active" | "consumed" | "disabled"-
updatedAtstring-
usednumber-

On this page