1,234
5,678
Expert
15K

Mind Bubble

Displays mindscore with level-based styling, animations, and optional label.

The MindBubblePill displays a clone's mindscore with level-based color schemes and animation states. It's the visual component that represents the "mind" training level.

Installation

The MindBubblePill component is part of the @delphi/features package:

import { MindBubblePill } from "@delphi/features/mind-bubble";

Basic Usage

import { MindBubblePill } from "@delphi/features/mind-bubble";
import { CirclePlusIcon } from "@delphi/ui";

function Example() {
  return (
    <MindBubblePill levelName="Skilled">
      <div className="flex items-center gap-1 pr-0.5 text-white">
        <CirclePlusIcon className="size-4.5 opacity-85" />
        <span className="font-semibold">1,234</span>
      </div>
    </MindBubblePill>
  );
}

Levels

The component supports seven training levels, each with distinct color schemes:

LevelScore RangeColor Theme
Novice0 - 499Orange-red
Skilled500 - 2,499Orange
Expert2,500 - 9,999Purple
Master10,000 - 49,999Blue
Sage50,000 - 249,999Green
Legendary250,000 - 999,999Gold
Eternal1,000,000+Navy

Animation States

Luminating

Enable the isLuminating prop when training is in progress. This creates a pulsing glow effect:

<MindBubblePill levelName="Skilled" isLuminating>
  {/* content */}
</MindBubblePill>

Glowing

The isGlowing prop enables a subtle constant glow effect:

<MindBubblePill levelName="Skilled" isGlowing>
  {/* content */}
</MindBubblePill>

Vertical Orientation

Use orientation="vertical" to display the pill with the level label below the content:

<MindBubblePill levelName="Expert" orientation="vertical">
  {/* content */}
</MindBubblePill>

Full MindBubble Component

For complete functionality including the dialog, training status, and context, use the full MindBubble component with its provider:

import { MindBubble, MindBubbleProvider } from "@delphi/features/mind-bubble";

function App() {
  return (
    <MindBubbleProvider slug="my-clone" cloneId="clone-123">
      <MindBubble orientation="horizontal" />
    </MindBubbleProvider>
  );
}

The full component includes:

  • Automatic mindscore fetching
  • Training status indicators
  • Click-to-open dialog for adding content
  • Real-time updates during training

API Reference

MindBubblePill Props

PropTypeDefaultDescription
levelNamestringrequiredLevel name (Novice, Skilled, Expert, Master, Sage, Legendary, Eternal)
childrenReactNoderequiredContent to display inside the pill
orientation"horizontal" | "vertical""horizontal"Layout orientation - vertical shows level label
isLuminatingbooleanfalseEnable pulse animation (during training)
isGlowingbooleanfalseEnable glow effect
disabledbooleanfalseDisable click interactions
onClick() => void-Click handler
classNamestring-Additional CSS classes
styleCSSProperties-Inline styles

MindBubble Props

PropTypeDefaultDescription
orientation"horizontal" | "vertical""horizontal"Layout orientation
disabledbooleanfalseDisable interactions
hideTrainingStatusBelowLgbooleanfalseHide training status on small screens
classNamestring-Additional CSS classes
Use horizontal orientation for inline displays (headers, profiles)
Use vertical orientation when showcasing the level name is important
Enable isLuminating when training is in progress
Use the full MindBubble component with provider for complete functionality
Use MindBubblePill without proper context when using click handlers that need dialog
Mix different level colors in the same view without clear purpose
Use the luminating animation when training is not actually in progress
ESC
No results found