Boss Bar

Video game boss health bar for Remotion: named hits drain the HP bar until it breaks and DEFEATED slams in under the boss name, like The old workflow.

In Remotion, Boss Bar is a video game boss health bar: the HP bar fills, each named hit slams in and drains it, and when the bar breaks a "DEFEATED" label slams in under the boss name, such as "The old workflow". Use it for a playful beat where your features defeat a legacy workflow one hit at a time.

Installation
$ pnpm dlx shadcn@latest add @remocn/boss-bar

How to build this in Remotion

You don't have to build the bar, hits and slam from spring() and random(). Install the component and pass the boss and hits:

bash
npx shadcn@latest add @remocn/boss-bar

Hits, the bar drain, the shatter and the defeated slam are scheduled in timeline.ts and animated with interpolate() on Easing.bezier curves; the bar is SVG. The defeated impact lands at 44 + (hits − 1) × hitGap, shakes the camera and starts the glow.

Good to know

  • Length: 124 frames of motion at 30 fps (248 at 60 fps) with the default props; the demo plays 160 frames, which adds a hold. Its length follows the hits: 72 + (hits − 1) × hitGap frames at 30 fps, so the default three hits 26 frames apart give 124. The Usage example below is a 60 fps composition, so the numbers it hands to Remotion are doubled, see Frame rate.
  • Installs: remotion, @remotion/google-fonts from npm, plus the remocn helpers glide, frame-rate, timeline. The shadcn CLI copies the source into your project.
  • Fonts: loads Chakra Petch and Manrope itself through @remotion/google-fonts. Pass fontFamily to use your own face, and load it in your project.
  • A screen shake on the defeated impact is built in. There is no sound; add an Audio on that frame in your composition.

Usage

tsx
// src/Root.tsx
import { Composition } from "remotion";
import { BossBar } from "@/components/remocn/boss-bar";
 
const BossBarScene = () => (
  <BossBar boss="THE OLD WORKFLOW" hits={[{ label: "Captions", damage: 800 }, { label: "Templates", damage: 1200 }]} />
);
 
export const RemotionRoot = () => (
  <Composition
    id="BossBar"
    component={BossBarScene}
    durationInFrames={320}
    fps={60}
    width={1280}
    height={720}
  />
);

A boss HP bar fills in, each named hit slams in and drains the bar, and when it breaks the defeated word slams in beneath the boss name. Pass boss, hits (label and damage) and defeated; it ships light and dark.

Props14

PropTypeDefault
boss
string"THE OLD WORKFLOW"

Boss name over the bar.

hits
BossHit[]—

Hits in order; the last one takes the bar to zero.

defeated
string"DEFEATED"

Word slammed in when the bar breaks.

tag
string"BOSS"

Small label in the accent tag before the boss name.

hitGap
number26

Frames between hits.

accent
string"#3B5BFD"

The small "BOSS" tag and the hit slash.

ink
string—

Text color; overrides the theme ink.

background
string—

Background fill; pass "transparent" to drop it.

fontFamily
string"Chakra Petch"

Typeface for the copy. Chakra Petch loads by default; load any other face in your project first.

logo
React.ReactNode—

Replaces the remocn mark.

scale
number1

Size of the foreground around the frame's center; the background stays put.

delay
number0

Frames to hold the first frame before anything moves.

theme
"dark" | "light""dark"

Colour scheme; ships light and dark.

speed
number1

Playback multiplier; above 1 plays faster.

  • bossstring

    Boss name over the bar.

    Default"THE OLD WORKFLOW"

  • hitsBossHit[]

    Hits in order; the last one takes the bar to zero.

  • defeatedstring

    Word slammed in when the bar breaks.

    Default"DEFEATED"

  • tagstring

    Small label in the accent tag before the boss name.

    Default"BOSS"

  • hitGapnumber

    Frames between hits.

    Default26

  • accentstring

    The small "BOSS" tag and the hit slash.

    Default"#3B5BFD"

  • inkstring

    Text color; overrides the theme ink.

  • backgroundstring

    Background fill; pass "transparent" to drop it.

  • fontFamilystring

    Typeface for the copy. Chakra Petch loads by default; load any other face in your project first.

    Default"Chakra Petch"

  • logoReact.ReactNode

    Replaces the remocn mark.

  • scalenumber

    Size of the foreground around the frame's center; the background stays put.

    Default1

  • delaynumber

    Frames to hold the first frame before anything moves.

    Default0

  • theme"dark" | "light"

    Colour scheme; ships light and dark.

    Default"dark"

  • speednumber

    Playback multiplier; above 1 plays faster.

    Default1

Common questions

How do I build a video game boss health bar in Remotion that hits drain until DEFEATED slams in?

Install Boss Bar with npx shadcn@latest add @remocn/boss-bar, pass boss="The old workflow", hits (each a label and damage) and defeated.

How long does it take with more hits?

72 + (hits − 1) × hitGap frames at 30 fps. Double it for a 60 fps composition.

  • Kill Feed: a streak of wins in a game-style feed.
  • Round Slam: a ROUND 1 call and a one-word finisher.
  • Ko Count: a count to ten before a big verdict word.
  • Got Em: a suspense line that explodes into GOT EM.