Skip to content
Pebble Pro is here at $49 one timeSee what’s included ↗
Pebble
ComponentsDocsMCPPricing
⌕ Find a component↗Log in
All components 673

Categories

Core inputs & forms46Buttons & actions33Navigation36Overlays & feedback49Data display33Charts & data viz40Cards & layout43Marketing blocks38App shells & pages37AI interfaces40Text & typography effects33Backgrounds & visual effects38Motion & transitions32Numbers & counters32Media34E-commerce333D & interactive36Themed sets40
Start with the essentials.Installation guide ↗Connect your agent ↗
← All componentsData display

Diff View

A single-file diff with a collapsible header showing path, change counts and a five-cell bar, old/new line gutters, add/remove rows marked by tint and glyph, and foldable unchanged context.

Preview

Changes to src/billing/invoice-total.ts: 4 additions, 4 deletions
Old lineNew lineChangeCode
11 unchangedimport { roundCents } from "./money";
22 unchangedimport type { LineItem } from "./types";
33 unchanged​
4−removedexport function invoiceTotal(items: LineItem[], taxRate: number) {
4+addedexport function invoiceTotal(items: LineItem[], taxRate: number, discount = 0) {
55 unchanged let subtotal = 0;
66 unchanged for (const item of items) {
77 unchanged subtotal += item.unitPrice * item.quantity;
1515 unchanged const issued = new Date().toISOString();
1616 unchanged const due = addDays(issued, 30);
1717 unchanged const ref = makeReference(issued, lines);
18−removed const tax = cents * taxRate;
19−removed return roundCents(cents + tax);
18+added const discounted = Math.max(0, cents - discount);
19+added const tax = discounted * taxRate;
20+added return roundCents(discounted + tax);
2021 unchanged}
2122 unchanged​
2223 unchangedexport function formatTotal(cents: number) {
@@ -48,5 +49,4 @@export function formatTotal(cents: number) {
4849 unchangedexport function dueLabel(days: number) {
4950 unchanged if (days <= 0) return "Due today";
50−removed if (days === 1) return "Due tomorrow";
5151 unchanged return `Due in ${days} days`;
5252 unchanged}
Changes to packages/ui/theme/tokens.ts: 1 addition, 1 deletion
Old lineNew lineChangeCode
@@ -4,3 +4,3 @@
44 unchangedexport const theme = {
5−removed radius: "0.5rem",
5+added radius: "0.625rem",
66 unchanged font: "var(--font-sans)",

Install

Pro source requires Pebble Pro. Try the full preview above.

Props

PropTypeDefaultDescription
pathstring—Current file path (required).
oldPathstring—Previous path; implies renamed when it differs.
status"modified" | "added" | "deleted" | "renamed"inferredStatus pill in the header.
hunksDiffHunk[]—Hunks { oldStart, newStart, header?, lines: { type, content }[] } (required); parseUnifiedDiff builds them from a unified diff.
contextLinesnumber3Unchanged lines kept beside each change; longer runs fold.
defaultOpenbooleantrueInitial open state when uncontrolled.
openboolean—Controlled open state; pair with onOpenChange.
onOpenChange(open: boolean) => void—Called when the header toggles.
wrapbooleanfalseWrap long lines instead of scrolling sideways.
actionsReactNode—Controls at the end of the header, outside the toggle.

Pro component

Try the full preview above. Editable source and build guides require Pebble Pro.

Buy Pebble Pro — $49How source access works ↗
Pebble

Small details.
Better interfaces.

React components to explore, make your own, and build on.

Library

  • Components
  • Installation
  • Pricing

Resources

  • For agents
  • About
  • Support

Legal

  • License
  • Terms
  • Privacy
  • Final sale

Built by Pebble

A product of Praxys Solutions LLC ↗

Pebble Pro is live

$49 one time, lifetime updates ↗