GLS Registry

Labels List

Filtered list of label packs at a Parcel Shop with usage counters and a consume action.

En el punto

  • 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
  • PS5000 - PS5499

    Activada el 5 may 2026

    17%85/500 usadas
  • PS100 - PS199

    Consumido el 28 abr 2026

    Consumido
  • PS5500 - PS5999

    Desactivada el 20 abr 2026

    Desactivada
  • PS6000 - PS6499

    Activada el 8 may 2026

    82%412/500 usadas

Installation

pnpm dlx shadcn@latest add @ecodeliver/labels-list

Usage

Pass the full labels array. Status filtering is owned inside the component (all or a LabelStatus). Wire onMarkConsumed for the trash action on active packs.

import { LabelsList } from "@/components/registry/labels-list";
import { labels } from "@/mocks";

export function Example() {
  return (
    <LabelsList
      labels={labels}
      onMarkConsumed={(id) => {
        // open confirm dialog for id
      }}
    />
  );
}

Display

  • Range: rangeFrom - rangeTo
  • Subtitle from status + updatedAt (format(..., "PP", { locale: es }))
  • Active: percent and used/500 usadas, trash action
  • Consumed / disabled: status badge

Filters (UI labels in Spanish): Todas, Activas, Consumidas, Desactivadas. Pack size is always 500.

API Reference

LabelsList

PropTypeDefault
labelsLabelPack[]-
onMarkConsumed(id: string) => void-

LabelPack

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

On this page