Back to Tooljet

InlineInfo — Rocket Design Spec

frontend/src/components/ui/Rocket/InlineInfo/InlineInfo.spec.md

3.20.154-lts2.8 KB
Original Source

InlineInfo — Rocket Design Spec

<!-- figma: https://www.figma.com/design/XQdM9x8x9YHcj1lUK8abUG/Rocket-components?node-id=8802-5649 --> <!-- synced: 2026-03-16 -->

Props

PropTypeValuesDefault
typestringinfo | warning | dangerinfo
variantstringghost | secondary | outline | filledghost
titleReactNode
descriptionReactNode
actionReactNode
iconReactNodecustom icon overrideauto per type
classNamestring

Layout

[icon 18×18]  [content]
               ├── title (12px medium, text/medium)
               ├── description (12px regular, text/placeholder) — optional
               └── action slot — optional
  • Root: flex, gap-1.5 (6px)
  • Content: flex-col, gap-2 (8px)
  • Icon is 18×18, shrink-0, top-aligned

Token Mapping

Type → icon color

TypeFigma tokenToolJet class
infoicon/accenttw-text-icon-accent
warningicon/warningtw-text-icon-warning
dangericon/dangertw-text-icon-danger

Variant → container style

VariantFigma tokenToolJet classExtra
ghost(no bg)no padding, no radius
secondaryInteractive/defaulttw-bg-interactive-defaulttw-p-3 tw-rounded-md
outline--bg-surface-layer-01tw-bg-background-surface-layer-01tw-p-3 tw-rounded-md tw-shadow-elevation-100
filled + info--bg-accent-weaktw-bg-background-accent-weaktw-p-3 tw-rounded-md
filled + warningbackground/warning-weaktw-bg-background-warning-weaktw-p-3 tw-rounded-md
filled + dangerbackground/error-weaktw-bg-background-error-weaktw-p-3 tw-rounded-md

Text

ElementFigma tokenToolJet class
titletext/mediumtw-text-text-medium tw-font-medium
descriptiontext/placeholdertw-text-text-placeholder

Both 12px / 18px line-height → tw-text-base (maps to 12px in ToolJet config)

Default icons

TypeIcon (lucide)
infoAlertCircle or Info
warningAlertTriangle
dangerAlertTriangle

Icon size: 18px (matches Figma's 18×18 frame).

CVA Shape

Shape B — variants only (type + variant), no sizes

Uses filled variant with type-specific bg applied dynamically.

Notes

  • Uses shadcn Alert as structural base (role="alert" for accessibility). AlertTitle and AlertDescription used for sub-content.
  • action slot accepts any ReactNode — typically a <Button variant="outline" size="medium"> per Figma.
  • Icon auto-selects per type prop but can be overridden via icon prop.
  • variant="ghost" has no padding/radius — inline appearance.
  • All other variants get tw-p-3 tw-rounded-md.