Lattice Grid Buy a licence

demo D221

Recent candidates

A candidate list: circular avatar, name over email, a stage pill and two action buttons

render: 'image' · 'twoline' · 'pill' · cell.template

Building…
Loading a live grid…

The configuration

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@toclocoinc/lattice-grid@1.13.0/lattice-grid.min.css">
<script src="https://cdn.jsdelivr.net/npm/@toclocoinc/lattice-grid@1.13.0/lattice-grid.min.js"></script>

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@toclocoinc/lattice-grid@1.9.1/lattice-grid.min.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&display=swap">
<style>
  body { font-family: "IBM Plex Sans", system-ui, sans-serif; background: #EFEDE4; padding: 34px; }
  .card { background: #FBFAF5; border-radius: 20px; padding: 22px 24px 12px;
    box-shadow: 0 1px 2px rgba(20,22,28,.04), 0 18px 46px -30px rgba(20,22,28,.4); }
  .card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
  .card-head h2 { font-size: 1.25rem; font-weight: 700; margin: 0; }

  /* The grid adopts the card's palette through the theme's real token names. */
  .lattice {
    --lattice-background: transparent;
    --lattice-border-color: #EDEAE0;
    --lattice-header-foreground: #8C8A80;
    --lattice-accent: #F0A94C;
    /* Re-tint the four built-in pill variants. The pill renderer reads its
       variant from its own props, so these tokens are the extension point. */
    --lattice-variant-success-fill: #DEF7EC; --lattice-variant-success-text: #036C4F;
    --lattice-variant-info-fill: #E1EFFE;    --lattice-variant-info-text: #1A56DB;
    --lattice-variant-accent-fill: #EDE9FE;  --lattice-variant-accent-text: #6D28D9;
    --lattice-variant-warning-fill: #FEF0DC; --lattice-variant-warning-text: #92400E;
  }
  .lattice .lat-header-cell, .lattice .lat-cell { border-right: 0; }
  .lattice .is-strong { font-weight: 600; }
  /* props.variant is written out as data-variant, so keying off it here is what
     makes the amber progress bar its own colour over a hatched track. */
  .lattice [data-variant="amber"] .lat-progress-track {
    background-image: repeating-linear-gradient(-45deg, #E7EBF3 0 4px, #F4F6FA 4px 8px);
    background-color: #F4F6FA; border-radius: 999px; height: 12px;
  }
  .lattice [data-variant="amber"] .lat-progress-fill { background: #F5B863; border-radius: 999px; }
  .lattice .kebab { font: inherit; font-size: 18px; color: #8C8A80; background: none; border: 0; cursor: pointer; }
  .lattice .btn { font: inherit; font-size: .82rem; font-weight: 600; border-radius: 999px; padding: 7px 14px; cursor: pointer; margin-right: 8px; }
  .lattice .btn--primary { background: #F5B863; color: #4A3410; border: 0; }
  .lattice .btn--ghost { background: transparent; color: #17181C; border: 1px solid #E2DFD2; }
</style>

<div class="card">
  <div class="card-head"><h2>Recent Candidates</h2></div>
  <div id="candidates"></div>
</div>

<script>
  // avatar is an inline SVG data URI (initials on a disc); swap it for a photo URL.
  const candidates = [
    { id: '1', name: 'Elena Rodriguez', email: 'elena.r@example.com', avatar: 'data:image/svg+xml,…',
      position: 'Senior Frontend Developer', progress: 40, stage: 'Screening', applied: '2026-03-08' },
    // …
  ];

  LatticeGrid.createGrid(document.getElementById('candidates'), {
    rowKey: 'id',
    density: 'spacious',
    showColumnFunctions: false,
    autoHeight: true,
    columns: [
      { field: 'avatar', title: ' ', sort: { enabled: false }, layout: { width: 64 },
        cell: { render: 'image', props: { shape: 'circle', size: 'md', alt: '' } } },
      { field: 'name', title: 'Candidate', layout: { width: 230 },
        cell: { render: 'twoline', props: { secondary: 'email' } } },
      { field: 'progress', title: 'Position', sort: { enabled: false }, layout: { width: 130 },
        cell: { render: 'progress', props: { min: 0, max: 100, showValue: false, variant: 'amber', label: 'Stage progress' } } },
      { field: 'position', title: ' ', sort: { enabled: false }, layout: { width: 210 }, header: { render: () => '' } },
      { field: 'stage', title: 'Stage', layout: { width: 150 },
        cell: { render: 'pill', props: { shape: 'pill',
          variant: { map: { Screening: 'info', 'Phone Screen': 'success', Interview: 'accent', Offer: 'warning' }, default: 'neutral' } } } },
      { field: 'applied', title: 'Applied date', type: 'date', format: { pattern: 'd MMM yyyy' }, layout: { width: 150 } },
      { id: 'act', title: 'Action', sort: { enabled: false }, layout: { width: 320 },
        cell: { template: '<button class="btn btn--primary">Schedule interview</button>'
                        + '<button class="btn btn--ghost">View profile</button>' } },
    ],
    rows: candidates,
  });
</script>