Skip to content

Blocks ​

A block is a scene that is already made: a chat that types its reply, a terminal that runs commands, a ranking that reorders, a quote that builds word by word. It is bigger than a component and smaller than a video. You place it on a track, set what it says and how it looks, and it plays on the video's clock like any free code. Nine ship with the CLI, so they work offline and match the version you have installed.

See it in: From notes to a cut, a short made of five placements of four blocks. An interview that changes layout and Snake heart use blocks too.

What a block is ​

A block is one file: a React component, its props schema with a label for every value, its defaults, and a meta that says what it is for, when not to use it and how long it takes. Its colours and fonts default to the video's theme tokens ($accent, $heading), so a block takes on the look of the video it is placed in; themeCss("$accent") gives your own components the same var(--us-accent). It names its parts (data-name), so the layout check and uberscene where report them.

A block reads its Layer's clock. Given more time than its natural length, it holds its last state. The props that time its moments are listed as its beats: most (changes, after) are seconds since its Layer started, and a prop called start is seconds of the video, which is what a narration's cue gives.

Find one by its job ​

sh
npx uberscene blocks --for "reorder" --aspect 9:16
npx uberscene blocks --sheet blocks.png

The list gives each block's title, what it does, when to use it and when not, the props that time it, and the line that places it. --for keeps the blocks whose description mentions every word given; --aspect keeps those laid out for a frame shape. --sheet pastes their previews into one picture, numbered as listed, to choose by looking. --json gives the same list for a program.

Add it to a video ​

sh
npx uberscene blocks add ranked-list --into video.tsx --track graphics --at hook@word:14 --duration 6

This copies the block into the project as blocks/ranked-list.tsx, beside uberscene.json, and records its version and a hash of its text in the manifest. With --into, it also imports the component in the video and adds a Layer holding it at the end of the track:

tsx
import { RankedList } from "./blocks/ranked-list";

<Layer id="ranked-list" anchor="hook" at="word:14" duration={6}>
  <RankedList />
</Layer>

--at takes seconds (a start), an element (anchor), or a word of a clip (hook@word:14, an anchor and an at). --duration defaults to the block's length and --id to its name. The video is read back after the change; if it does not load or has new errors, it is put back as it was.

Tune it where it is placed ​

What changes from one use to the next is the props on the tag, not the copy. Two placements of one block can say different things without two files:

tsx
<Layer id="check" start={20.2} duration={7.8}>
  <RankedList
    title="STILL WATCHING, BY SCENE"
    rows={[
      { label: "Demo", values: [52, 61, 74] },
      { label: "Problem", values: [70, 64, 58] },
    ]}
    changes={[1.6, 3.6]}
  />
</Layer>

In the editor these are the Layer's handles: each prop of the schema is a control, labelled by its description, and the editor writes the value back to the tag. A colour, a font or an image prop gets the control for its kind. An agent reads the same labels from uberscene inspect --json.

Keep it up to date ​

sh
npx uberscene blocks update

A copy nobody has edited (its text still matches the hash in the manifest) is replaced with the version that ships with your CLI, and its record is updated. A copy you have edited is left alone and its diff is printed, so you can see what a newer block would change; --force replaces it anyway. The copy is yours to edit: the comment at the top of each block says what is meant to change, what is safe to edit and what holds its motion together.

The catalogue ​

Bar race ​

Bars grow and overtake each other period by period, the leaders shown, the period named beside them.

  • Use it for: how a ranking changed over years or months; a race between options over time; show who rose and who fell.
  • Not for: two or three steps only: use ranked-list; values that never cross: a plain bar chart says it.
  • Goes with: ranked-list, narrate.
  • Length: 5.5 s with its defaults; given longer, it holds its last state. Frame: 9:16. Timed by: after.
propkinddefaultwhat it is
seriesother6 itemsThe series that race
periodsother6 itemsThe name of each period, such as a year
afternumber0.5Seconds since the layer started at which the race begins
everynumber0.9Seconds each period lasts
shownumber5How many bars are shown, the leaders
suffixtext"%"Written after every value
xnumber150Left edge of the race, in pixels
ynumber520Top edge of the race, in pixels
widthnumber780Width of the longest bar's lane, in pixels
barHeightnumber84Height of a bar, in pixels
gapnumber20Pixels between bars
paletteother6 itemsColours the bars take in turn, unless a series names its own
inkcolor"$text"Colour of the names, values and the period
mutedcolor"$muted"Colour of the axis line
fontfont"$heading"Font of the race
weightnumber700Weight of the names and values
sh
npx uberscene blocks add bar-race --into video.tsx --track graphics --at 2

Character wall ​

A frame-filling grid of characters, each changing at its own pace, and all at once on the moments given.

  • Use it for: a living ground behind a game, a word or a phrase; a busy texture of letters or signs; a beat the whole frame reacts to.
  • Not for: text that must be read: the wall is texture, not words; footage under it: it covers the frame.
  • Goes with: narrate, grid.
  • Length: 6 s with its defaults; given longer, it holds its last state. Frame: 9:16. Timed by: changeAt, dim.
propkinddefaultwhat it is
charstext"春夏秋冬日月星光年梦声歌诗画书茶酒灯窗桥路城门钟船信纸笔琴棋伞镜糖盐米面"The characters the wall is made of; use a font that has them
columnsnumber8Cells across the frame
rowsnumber15Rows of cells, centred top to bottom; rows past the frame run off it
colorcolor"$muted"Colour of the characters
backgroundcolor"$background"Colour behind them
fontfont"$heading"Font of the characters
weightnumber400Weight of the characters
scalenumber0.9A character's size, as a share of its cell
pacenumber1How slowly the characters change: 1 is the default pace, 2 half as fast
changeAtother0 itemsSeconds since the layer started at which every character changes at once
dimother, optionalWhen the wall fades back, to leave room for what is on top
sh
npx uberscene blocks add character-wall --into video.tsx --track graphics --at 2

Chat reveal ​

A chat exchange: a question slides up, a reply shows dots, then types in word by word.

  • Use it for: show what someone asked and what came back; a product demo of a prompt and its answer; a conversation told as messages.
  • Not for: a real app's screen must be shown: record it instead; long replies: they outgrow the frame.
  • Goes with: terminal-typing, phone-tap, narrate.
  • Length: 5.5 s with its defaults; given longer, it holds its last state. Frame: 9:16. Timed by: messages.
propkinddefaultwhat it is
messagesother2 itemsThe messages, in order
thinkingnumber0.9Seconds of dots before a reply starts typing
wordsPerSecondnumber7How fast a reply types, in words a second
labeltext"ASSISTANT"A small line above the replies, such as the assistant's name; empty for none
xnumber150Left edge of the column, in pixels
ynumber560Top edge of the column, in pixels
widthnumber780Width of the column, in pixels
sizenumber40Size of the text, in pixels
personcolor"$primary"Colour of the person's bubbles
onPersoncolor"$onPrimary"Colour of the text in the person's bubbles
replycolor"$surface"Colour of the reply bubbles
inkcolor"$text"Colour of the text in the reply bubbles
mutedcolor"$muted"Colour of the dots and the label
fontfont"$body"Font of the messages
sh
npx uberscene blocks add chat-reveal --into video.tsx --track graphics --at 2

Hundred cells ​

A grid of cells fills one by one, each a shade nearer the accent, with the count beside it; then one more arrives.

  • Use it for: count up to a big number; show a hundred tries, days or videos; make progress visible.
  • Not for: the number is a measurement, not a count of things: use CountUp; fewer than ten things.
  • Goes with: point-list, narrate.
  • Length: 4 s with its defaults; given longer, it holds its last state. Frame: 9:16. Timed by: fill, next.
propkinddefaultwhat it is
totalnumber100How many cells fill
columnsnumber20Cells to a row
labeltext"VIDEOS"The word under the count
extrabooleantrueWhether one more cell arrives after the rest, ringed
fillother{"after":0.3,"over":2}When the cells fill
nextother{"after":3.4,"over":0.3}When the extra cell arrives
xnumber120Left edge of the grid, in pixels
ynumber840Top edge of the grid, in pixels
cellnumber26A cell's size, in pixels
gapnumber6Pixels between cells
accentcolor"$accent"Colour of the last cells, the extra cell and the label
fromcolor"#8fa0d0"Colour of the first cell
dimcolor"$surface"Colour of a cell not yet filled
inkcolor"$text"Colour of the count and of the ring
fontfont"$heading"Font of the count and the label
weightnumber800Weight of the count and the label
sh
npx uberscene blocks add hundred-cells --into video.tsx --track graphics --at 2

Phone tap ​

A phone with a simple screen; a fingertip presses given points, each with a ripple, and selects the row it hits.

  • Use it for: show where to tap in an app; a step of a mobile flow; point at one item of a list on a phone.
  • Not for: a real app must be shown exactly: record its screen; many screens in a row: cut between recordings.
  • Goes with: chat-reveal, point-list, narrate.
  • Length: 5 s with its defaults; given longer, it holds its last state. Frame: 9:16. Timed by: taps.
propkinddefaultwhat it is
titletext"Today"The screen's heading
rowsother6 itemsThe rows of the list on the screen
imagetext, optionalA picture to show on the screen instead of the title and rows, as a URL
tapsother2 itemsWhere and when the finger presses
xnumber310Left edge of the phone, in pixels
ynumber290Top edge of the phone, in pixels
heightnumber940Height of the phone, in pixels; its width follows
bodycolor"#1b2133"Colour of the phone's frame
screencolor"$background"Colour of the screen
rowcolor"$surface"Colour of a row
inkcolor"$text"Colour of the title and the rows' text
mutedcolor"$muted"Colour of the rows' second lines
accentcolor"$accent"Colour of a selected row's edge and of the ripple
fontfont"$body"Font of the screen
sh
npx uberscene blocks add phone-tap --into video.tsx --track graphics --at 2

Point list ​

A row of tiles, one per point, each with a small drawing and a label, lit in turn as each point is named.

  • Use it for: a list of three to six points named one after another; steps, ingredients or improvements as they are said.
  • Not for: more than six points: they will not fit a row; points that need a sentence each: use a card.
  • Goes with: hundred-cells, narrate.
  • Length: 6 s with its defaults; given longer, it holds its last state. Frame: 9:16. Timed by: points.
propkinddefaultwhat it is
pointsother5 itemsThe points, in the order they are named
xnumber120Left edge of the row, in pixels
ynumber830Top edge of the row, in pixels
widthnumber140A tile's width, in pixels
heightnumber170A tile's height, in pixels
gapnumber17Pixels between tiles
accentcolor"$accent"Colour of the lit tile's edge, the tags and the drawings' highlights
inkcolor"$text"Colour of a lit tile's drawing and label
fadedcolor"#7f8bb3"Colour a drawing and label dim to once the next point arrives
tilecolor"$surface"Colour of the tiles
fontfont"$heading"Font of the tags and labels
weightnumber800Weight of the tags and labels
sh
npx uberscene blocks add point-list --into video.tsx --track graphics --at 2

Quote build ​

A quotation arrives word by word, its key words stressed in the accent, then the name of who said it.

  • Use it for: a line worth reading on screen; a testimonial or a quote from an interview; the thesis of a video.
  • Not for: more than about thirty words: split it; words that must match a voice exactly: time them with captions.
  • Goes with: narrate, chat-reveal.
  • Length: 5 s with its defaults; given longer, it holds its last state. Frame: 9:16. Timed by: after.
propkinddefaultwhat it is
texttext"The first draft is only you telling …The quotation, without quote marks
stressother2 itemsWords to stress, as written in the quote; punctuation around them is ignored
authortext"A writer's rule"Who said it; empty for none
roletext"on drafts"A line under the name, such as a title or a year; empty for none
afternumber0.6Seconds since the layer started at which the first word arrives
wordsPerSecondnumber3.2How fast the words arrive
xnumber150Left edge of the quote, in pixels
ynumber600Top edge of the quote, in pixels
widthnumber780Width of the quote, in pixels
sizenumber72Size of the quote's words, in pixels
inkcolor"$text"Colour of the words
accentcolor"$accent"Colour of the stressed words, their marks and the opening mark
mutedcolor"$muted"Colour of the role line
fontfont"$heading"Font of the quote
weightnumber700Weight of the quote's words
sh
npx uberscene blocks add quote-build --into video.tsx --track graphics --at 2

Ranked list ​

Rows ranked by their values; when the values change, the rows slide to their new places.

  • Use it for: a ranking that changes: before and after, week by week; show who overtakes whom; a top five whose order is the story.
  • Not for: a race over many periods: use bar-race; values that do not change: a plain list reads faster; more than eight rows.
  • Goes with: bar-race, hundred-cells, narrate.
  • Length: 5 s with its defaults; given longer, it holds its last state. Frame: 9:16. Timed by: changes.
propkinddefaultwhat it is
titletext"MOST USED, BY WEEK"The line above the ranking; empty for none
rowsother5 itemsThe rows, in any order: they are placed by their values
changesother2 itemsSeconds since the layer started at which the values move to their next step
overnumber0.7How long a change takes, in seconds
suffixtext"%"Written after every value, such as % or k
decimalsnumber0Digits after the point in the values
xnumber150Left edge of the ranking, in pixels
ynumber560Top edge of the ranking, in pixels
widthnumber780Width of the ranking, in pixels
rowHeightnumber92Height of a row, in pixels
gapnumber18Pixels between rows
accentcolor"$accent"Colour of the leader's bar and place
barcolor"$primary"Colour of the other bars
trackcolor"$surface"Colour behind each bar
inkcolor"$text"Colour of the names, the values and the title
mutedcolor"$muted"Colour of the places other than the first
fontfont"$heading"Font of the whole ranking
weightnumber700Weight of the names and values
sh
npx uberscene blocks add ranked-list --into video.tsx --track graphics --at 2

Terminal typing ​

A terminal window: commands type in after a prompt, and their output appears line by line.

  • Use it for: show a command and what it does; a developer tool in action; install or run steps.
  • Not for: output longer than the window: it is not scrolled; a real tool's exact screen must be shown.
  • Goes with: chat-reveal, narrate.
  • Length: 5 s with its defaults; given longer, it holds its last state. Frame: 9:16. Timed by: steps.
propkinddefaultwhat it is
stepsother2 itemsThe commands, in order
prompttext"$"What comes before each command, such as $ or >
titletext"terminal"The window's title; empty for none
lettersPerSecondnumber22How fast a command types
lineGapnumber0.28Seconds between output lines
xnumber160Left edge of the window, in pixels
ynumber600Top edge of the window, in pixels
widthnumber760Width of the window, in pixels
heightnumber440Height of the window, in pixels
sizenumber30Size of the text, in pixels
windowcolor"#0d111c"Colour of the window
barcolor"$surface"Colour of the title bar
inkcolor"$text"Colour of the commands
outputcolor"$muted"Colour of the output
accentcolor"$accent"Colour of the prompt and the cursor
fontfont"$mono"Font of the terminal; a monospaced one
sh
npx uberscene blocks add terminal-typing --into video.tsx --track graphics --at 2

Next ​

  • Free code: what a block is made of, and how to write your own.
  • Checking a cut: the layout check and where, which report a block's parts.
  • The CLI: every option of blocks, blocks add and blocks update.

MIT licensed.