Resource Card

Resource card with status badge

SaaSResource

Overview

ResourceCard displays a resource in a compact card format showing its name, type, status badge, capacity range, and optional location. Supports loading skeleton, selected highlight, disabled state, and click interaction for selection or detail navigation.

Usage

import { ResourceCard } from "@leanicon/web-builder-library/saas";

<ResourceCard
  resource={{
    id: "room-1",
    name: "Conference Room A",
    type: "meeting-room",
    status: "active",
    capacity: { min: 1, max: 10, unit: "people" },
  }}
  onClick={(r) => console.log("Selected:", r.id)}
  onViewDetails={(r) => router.push(`/resources/${r.id}`)}
/>;

Variants

Default

Conference Room A

meeting-room

Capacity: 1-10 people

Active

Default (Dark)

Conference Room A

meeting-room

Capacity: 1-10 people

Active

Maintenance Status

Projector HP-2000

equipment

Maintenance

Inactive Status

Training Room

meeting-room

Capacity: 1-30 people

Inactive

Selected

Conference Room A

meeting-room

Capacity: 1-10 people

Active

Disabled

Conference Room A

meeting-room

Capacity: 1-10 people

Active

Loading

Props

NameTypeDefaultRequiredDescription
resourceResourceSummary | ResourceData—YesResource data (summary or full)
loadingbooleanfalseNoWhether card is in loading state
selectedbooleanfalseNoWhether card is selected
disabledbooleanfalseNoWhether card is disabled
labelsRecord<string, string>—NoOptional label overrides
classNamestring—NoCustom class name
onClick((resource: ResourceSummary | ResourceData) => void)—NoCalled when card is clicked
onViewDetails((resource: ResourceSummary | ResourceData) => void)—NoCalled when view details is clicked