MDK Logo

Display

Data display and formatting components

Components for displaying and formatting data.

Prerequisites

  • Complete the installation

  • Add the dependency to your app's package.json
{
  "dependencies": {
    "@tetherto/mdk-react-devkit": "*",
    "@tetherto/mdk-react-adapter": "*",
    "@tetherto/mdk-ui-foundation": "*"
  }
}

Run npm install from the mdk/ui workspace root after your app is under apps/ so npm links workspace packages.

  • Import styles: import '@tetherto/mdk-react-devkit/styles.css'

Components

@tetherto/mdk-react-devkit

Import the public APIs on this page from @tetherto/mdk-react-devkit.

Avatar

Circular avatar surface that shows a profile image with a graceful text fallback when the image fails to load

agent-ready

Source

https://github.com/tetherto/mdk/blob/main/ui/packages/react-devkit/src/primitives/components/avatar/index.tsx

AvatarFallback

Initials or icon placeholder shown inside <Avatar> while the image loads or when no image is available

agent-ready

Source

https://github.com/tetherto/mdk/blob/main/ui/packages/react-devkit/src/primitives/components/avatar/index.tsx

AvatarImage

Profile image slot inside <Avatar> — renders src and triggers the fallback on load failure

agent-ready

Source

https://github.com/tetherto/mdk/blob/main/ui/packages/react-devkit/src/primitives/components/avatar/index.tsx

Badge

Badge component - Display badge with number or dot

agent-ready

Source

https://github.com/tetherto/mdk/blob/main/ui/packages/react-devkit/src/primitives/components/badge/index.tsx

Props

PropStatusType / OptionsDefaultDescription
childrenOptionalReact.ReactNode-Badge content (wraps children with badge)
classNameOptionalstring-Custom className for badge
colorOptional"success" | "info" | "warning" | "error" | "primary" | "secondary" | "default""primary"Color variant
countOptionalnumber0Number to display in badge If > overflowCount, will show "overflowCount+"
dotOptionalbooleanfalseShow badge as a dot
offsetOptional[number, number][0, 0]Offset position [x, y] in pixels
overflowCountOptionalnumber99Maximum count to display
showZeroOptionalbooleanfalseWhether to show badge when count is 0
sizeOptional"sm" | "md" | "lg""md"Badge size
squareOptionalbooleanfalseSquare badge (no border-radius)
statusOptional"success" | "warning" | "error" | "default" | "processing"-Status badge (small dot badge with text)
textOptionalstring-Custom badge content (overrides count)
titleOptionalstring-Badge title for accessibility
wrapperClassNameOptionalstring-Custom className for wrapper

BtcAveragePrice

Read-only BTC average price label for reporting toolbars

agent-ready

Source

https://github.com/tetherto/mdk/blob/main/ui/packages/react-devkit/src/primitives/components/btc-average-price/index.tsx

Props

PropStatusType / OptionsDefaultDescription
labelOptionalstring"BTC Average Price"Label for the BTC average price
priceOptionalnumber | null-BTC price in USD; formatted with grouping and no decimal places. When null, undefined, non-finite, or negative, the value shows - (FALLBACK from format utils)

DataLabel

Read-only period label (PERIOD: start - end) with timezone-aware dates

agent-ready

Source

https://github.com/tetherto/mdk/blob/main/ui/packages/react-devkit/src/primitives/components/data-label/index.tsx

Props

PropStatusType / OptionsDefaultDescription
endDateOptionalDate | null-Range end; formatted in the active timezone (dd/MM/yy)
labelOptionalstring"PERIOD"Label text; defaults to PERIOD
startDateOptionalDate | null-Range start; formatted in the active timezone (dd/MM/yy)

Indicator

Indicator component - display status with colored background and label

agent-ready

Source

https://github.com/tetherto/mdk/blob/main/ui/packages/react-devkit/src/primitives/components/indicator/index.tsx

Props

PropStatusType / OptionsDefaultDescription
childrenOptionalReact.ReactNode-Children content (can include text, icons, multiple elements)
classNameOptionalstring-Custom className for the root element
colorOptional"red" | "gray" | "blue" | "yellow" | "green" | "purple" | "amber" | "slate""gray"Color variant of the indicator
onClickOptional(VoidFunction & React.MouseEventHandler<HTMLDivElement>)-Click handler
sizeOptional"sm" | "md" | "lg""md"Size variant of the indicator
verticalOptionalbooleanfalseWhen true, adds extra spacing between child elements and stacks them vertically. Useful for displaying multiple pieces of information (e.g. status + count) in a clear way

Tag

Tag component - display labels, categories, or status

agent-ready

Source

https://github.com/tetherto/mdk/blob/main/ui/packages/react-devkit/src/primitives/components/tag/index.tsx

Props

PropStatusType / OptionsDefaultDescription
childrenOptionalReact.ReactNode-Children content
classNameOptionalstring-Custom className for the root element
colorOptional"red" | "blue" | "green" | "amber" | "dark""dark"Color variant of the tag

Typography

Typography component for consistent text styling

agent-ready

Source

https://github.com/tetherto/mdk/blob/main/ui/packages/react-devkit/src/primitives/components/typography/USAGE.md#props-detail

Props

PropStatusType / OptionsDefaultDescription
alignOptional"center" | "left" | "right" | "justify"-Text alignment
classNameOptionalstring-Custom className
colorOptional"success" | "warning" | "error" | "primary" | "default" | "muted""default"Token-based text color
sizeOptional"sm" | "md" | "lg" | "xs" | "xl" | "2xl" | "3xl" | "4xl"-Text size; defaults to the variant's size when unset
truncateOptionalbooleanfalseTruncate text with ellipsis
variantOptional"body" | "caption" | "secondary" | "heading1" | "heading2" | "heading3""body"Determines the rendered HTML element and base style
weightOptional"medium" | "normal" | "light" | "semibold" | "bold"-Font weight; defaults to the variant's weight when unset

On this page