Skip to content

Component reference ​

Every piece of state has two components — one on the operator's control surface, one on air — and they meet at a path. That pairing is the whole mental model:

What it isControlSource
TextField, TextAreaVariable
NumberStepperVariable
A number, in iconsStepperTally
One of a listSelect, CycleVariable
A yes/noCycle with one optionVariable
ColourColorPickerScene vars
A pictureImagePicker, ImageSelectImage
Several picturesImageSelect multipleImageList
A folder of themthe image librarySlideshow
On or offToggle, ImageToggleToggle
Counting downCountdown, CountdownToTimer
Counting upStopwatchTimer
A tableLeaderboardyours
Scrolling textTextAreaTicker
Wall clock—Clock
GroupingPanel, BreakScene

Every component takes a name, and knows for itself where that name lives: values under variables, on/off ones under toggles, clocks under timers. So a studio author writes name="home.score" and never has to think about it — each component's name row says which. The two that act on several values at once, ResetButton and SwapButton, take paths for the rare case of reaching outside variables.

Every component passes anything it does not recognise through to the DOM, so style, data-* and the rest stay available.

Control ​

What the operator drives the show from — @single-studio/core/control. These render in src/control/Control.jsx, which is an ordinary React component: put controls in a Panel and it arranges them. Anything you type stages until you save, so a half-finished name never reaches air; anything you press takes effect at once. Each entry below says which.

The board also carries a menu you do not place: the room, the image library, the OBS URLs, the keyboard shortcuts and the ways to start over. Hotkeys is the one piece of it you can also put on the board yourself.

Field ​


import { Field } from '@single-studio/core/control'

One line of text an operator types, bound to a path. Staged until saved.

jsx
<Field name="home.name" label="Home" placeholder="Home team" />
jsx
// A dotted name groups related values; nothing has to declare the group
<Field name="lowerthird.headline" label="Headline" />
PropTypeRequiredDescription
classNamestringAdded to the component's own classes.
labelstringShown above the control.
namestringYesNames a value under variables — e.g. home.score.
placeholderstringHint shown in the empty input.

TextArea ​


import { TextArea } from '@single-studio/core/control'

Several lines of text an operator types, bound to a path. Staged until saved.

jsx
<TextArea name="guest.bio" label="Guest bio" rows={4} />
jsx
<TextArea name="ticker" label="Crawl text" rows={2} placeholder="One item per line" />
PropTypeRequiredDescription
classNamestringAdded to the component's own classes.
labelstringShown above the control.
namestringYesNames a value under variables — e.g. home.score.
placeholderstringHint shown in the empty box.
rowsnumberHow many lines tall. Defaults to 3.

Stepper ​


import { Stepper } from '@single-studio/core/control'

A number with minus and plus buttons, and a field to type into. The buttons add and subtract, so two operators pressing +1 at once come to +2 rather than +1. Writes immediately.

jsx
<Stepper name="home.score" label="Home score" />
jsx
// A sport that scores in threes
<Stepper name="home.score" label="Home score" step={3} />
PropTypeRequiredDescription
classNamestringAdded to the component's own classes.
labelstringShown above the control.
namestringYesNames a value under variables — e.g. home.score.
stepnumberHow much the -/+ buttons add, and the field's arrow keys. Defaults to 1.

Select ​


import { Select } from '@single-studio/core/control'

A dropdown of allowed values. Staged until saved.

jsx
<Select name="period" label="Period" options={['1st', '2nd', '3rd', 'OT']} />
jsx
// What the operator reads, and what the graphic gets
<Select
  name="round"
  label="Round"
  options={[
    { label: 'Quarter-final', value: 'qf' },
    { label: 'Semi-final', value: 'sf' },
  ]}
/>
PropTypeRequiredDescription
childrenReactNodeOptions as JSX, instead of options.
classNamestringAdded to the component's own classes.
labelstringShown above the control. Defaults to "Select".
namestringYesNames a value under variables — e.g. home.score.
optionsArray<string | { label: string, value: string }>What can be chosen. A bare string is both.
placeholderstringThe empty choice. Defaults to "— none —".

Cycle ​


import { Cycle } from '@single-studio/core/control'

One button that steps through a list of values in order, wrapping back to unset at the end. With a single option it is a checkbox: press to set it, press again to clear it — which is what to reach for when a graphic only needs "on or the value, or nothing". Writes immediately.

jsx
<Cycle name="period" label="Game" options={['Game 1', 'Game 2', 'Tiebreak']} />
jsx
// One option, so it toggles between that value and nothing
<Cycle name="status" label="Live" options={['LIVE']} />
PropTypeRequiredDescription
classNamestringAdded to the component's own classes.
labelstringShown above the control.
namestringYesNames a value under variables — e.g. home.score.
optionsstring[]Stepped through in order, wrapping back to unset. One option makes it a checkbox.

ColorPicker ​


import { ColorPicker } from '@single-studio/core/control'

A colour, as a swatch to pick from and a hex field to type into. Pair it with Scene's vars to drive anything a stylesheet can express. Staged until saved.

jsx
<ColorPicker name="home.color" label="Home colour" presets={['#0a3161', '#c8102e']} />
jsx
// and on the graphic
<Scene vars={{ '--home': 'home.color' }}>
  <div style={{ background: 'var(--home, #0a3161)' }} />
</Scene>
PropTypeRequiredDescription
classNamestringAdded to the component's own classes.
fallbackstringShown when nothing is set. Defaults to "#0ea5e9".
labelstringShown above the control. Defaults to "Color".
namestringYesNames a value under variables — e.g. home.score.
presetsstring[]Swatches offered beside the picker.

ImagePicker ​


import { ImagePicker } from '@single-studio/core/control'

One image, chosen by name from the studio's library, with a preview beside the dropdown and a magnifier to open the library itself. Writes asset:<key>. Staged until saved.

jsx
<ImagePicker name="guest.photo" label="Guest photo" />
jsx
<ImagePicker name="sponsor.logo" label="Sponsor" />
PropTypeRequiredDescription
classNamestringAdded to the component's own classes.
labelstringShown above the control. Defaults to "Image".
namestringYesNames a value under variables — e.g. home.score.

ImageSelect ​


import { ImageSelect } from '@single-studio/core/control'

Choose by picture rather than by name — a grid of tiles, which is what an operator can aim at inside a draft timer. multiple collects several. Writes immediately, or staged to hold it for a save.

jsx
const FACTIONS = [
  { label: 'Vanguard', value: 'vanguard', image: './factions/vanguard.svg' },
  { label: 'Syndicate', value: 'syndicate', image: './factions/syndicate.svg' },
]

<ImageSelect name="home.faction" label="Faction" options={FACTIONS} />
jsx
// The other half of the pair, in a graphic rather than on the board: the value
// this control writes ('vanguard') is what <Image> templates into a file name.
// Keep the list in one module and import it into both, so the two cannot drift.
<Image name="home.faction" src="./factions/:value:.svg" alt="" />
jsx
// Several, capped, and held until saved
<ImageSelect name="home.army" label="Army" options={UNITS} multiple max={8} staged />
PropTypeRequiredDescription
classNamestringAdded to the component's own classes.
labelstringShown above the control. Defaults to "Select".
maxnumberCap on how many, when multiple.
multiplebooleanChoose several. The value becomes a comma-separated list.
namestringYesNames a value under variables — e.g. home.score.
optionsArray<string | { label?: string, value: string, image?: string }>What can be chosen, shown as pictures. A bare string is all three.
size'sm' | 'md' | 'lg'Tile size. Defaults to "md".
stagedbooleanHold the choice until saved, rather than writing on click.

ImageToggle ​


import { ImageToggle } from '@single-studio/core/control'

An on/off button with a picture on it. group makes a row of them behave like radio buttons, which is how a scene picker is usually built. Writes immediately.

jsx
<ImageToggle name="lowerthird" label="Lower third" image="/ui/lower-third.svg" />
jsx
// One at a time. Same group name on each; nothing lists the others
<ImageToggle name="replay" image="/ui/replay.svg" group="feed" />
<ImageToggle name="live" image="/ui/live.svg" group="feed" />
<ImageToggle name="stats" image="/ui/stats.svg" group="feed" />
jsx
// The picture comes from whatever the operator picked, not a fixed file
<ImageToggle name="sponsor" from="variables.sponsor.logo" image="/ui/sponsor.svg" />
PropTypeRequiredDescription
classNamestringAdded to the component's own classes.
fromstringRead the picture from this path instead of image.
groupstringA group's name. Buttons sharing one behave as radio buttons.
imagestringThe picture on the button.
labelstringShown above the control.
namestringYesNames a value under toggles — e.g. lowerthird.
size'sm' | 'md' | 'lg'Defaults to "md".

Toggle ​


import { Toggle } from '@single-studio/core/control'

An on/off button for a path under toggles, which is what a graphic watches to know whether to be on air. group turns a set of them into radio buttons. Writes immediately.

jsx
<Toggle name="lowerthird" label="Lower third" />
jsx
// Exactly one of these can be on at a time
<Toggle name="stats" label="Stats" group="panels" />
<Toggle name="roster" label="Roster" group="panels" />
<Toggle name="bracket" label="Bracket" group="panels" />
PropTypeRequiredDescription
childrenReactNodeReplaces the generated "Show <label>" text.
classNamestringAdded to the component's own classes.
groupstringA group's name. Buttons sharing one behave as radio buttons.
labelstringNames what is toggled: the button reads "Show <label>".
namestringYesNames a value under toggles — e.g. lowerthird.

SwapButton ​


import { SwapButton } from '@single-studio/core/control'

Trade two sides of the board — teams changing ends. Asks first.

jsx
<SwapButton label="sides" names={['home.name', 'home.score', 'away.name', 'away.score']} />
jsx
// Longer sides stay readable, because neither half is written backwards
<SwapButton
  label="sides"
  names={['home.name', 'home.city', 'home.colour', 'away.name', 'away.city', 'away.colour']}
/>
jsx
// `paths` reaches outside `variables`, which `names` does not
<SwapButton label="scenes" paths={['toggles.left', 'toggles.right']} />
PropTypeRequiredDescription
childrenReactNodeReplaces the generated text.
classNamestringAdded to the component's own classes.
confirmbooleanAsk before trading. Defaults to true; pass confirm={false} to trade on one press.
labelstringNames what gets traded, on the button. Defaults to "Swap".
namesstring[]One side, then the other, spelled the same way. Cut in half and traded.
pathsstring[]Full paths, for trading values outside variables.

ResetButton ​


import { ResetButton } from '@single-studio/core/control'

Clear a set of values back to each source's own fallback. It unsets rather than writing empties, so a graphic falls back rather than going blank. Asks first.

jsx
<ResetButton label="scores" names={['home.score', 'away.score']} />
jsx
// One press, for something trivial to put back
<ResetButton label="the note" names={['lowerthird.note']} confirm={false} />
PropTypeRequiredDescription
childrenReactNodeReplaces the generated "Reset <label>" text.
classNamestringAdded to the component's own classes.
confirmbooleanAsk before clearing. Defaults to true; pass confirm={false} for a button that fires on one press.
labelstringNames what gets cleared: the button reads "Reset <label>". Defaults to "Reset".
namesstring[]Cleared back to each source's own fallback.
pathsstring[]Full paths, for clearing toggles or timers in the same press.

Countdown ​


import { Countdown } from '@single-studio/core/control'

Counts down a duration — a break, a half, a stinger. Without duration the operator types one; with it the control is a single press. Writes immediately.

jsx
<Countdown name="round" label="Round" />
jsx
// Always the same length, so one press starts it
<Countdown name="break" label="break" duration="5:00" />
PropTypeRequiredDescription
classNamestringAdded to the component's own classes.
durationstring | numberA fixed length, e.g. "5:00". Without it the operator types one.
labelstringShown above the control, and on the running clock.
namestringYesNames a value under timers — e.g. round.
placeholderstringHint in the duration field. Defaults to "5:00".

CountdownTo ​


import { CountdownTo } from '@single-studio/core/control'

Counts down to a time of day rather than a length — "we go live at 19:30". Rolls to tomorrow if the time has already passed today. Writes immediately.

jsx
<CountdownTo name="showtime" label="Doors open" />
jsx
// Something further out than today
<CountdownTo name="finals" label="Finals" as="datetime-local" />
PropTypeRequiredDescription
as'time' | 'datetime-local'"time" takes HH:MM and rolls to tomorrow if past. Defaults to "time".
classNamestringAdded to the component's own classes.
labelstringShown above the control. Defaults to "Starts at".
namestringYesNames a value under timers — e.g. round.

Stopwatch ​


import { Stopwatch } from '@single-studio/core/control'

Counts up from when it was started, with pause and reset. Stores an origin rather than a running total, so every machine derives the same number. Writes immediately.

jsx
<Stopwatch name="match" label="Show elapsed" />
PropTypeRequiredDescription
classNamestringAdded to the component's own classes.
labelstringShown above the control. Defaults to "Stopwatch".
namestringYesNames a value under timers — e.g. round.

Leaderboard ​


import { Leaderboard } from '@single-studio/core/control'

A table an operator can paste into or edit row by row, stored as one delimited string. fields names the columns; the graphic parses it back out. Staged until saved.

jsx
<Leaderboard name="standings" fields={['Team', 'W', 'L']} rows={8} />
jsx
// Pasted straight out of a spreadsheet
<Leaderboard name="results" fields={['Driver', 'Time']} delimiter="\t" />
PropTypeRequiredDescription
classNamestringAdded to the component's own classes.
delimiterstringWhat separates columns in the stored string.
fieldsstring[]Column names, in order.
labelstringShown above the control. Defaults to "Leaderboard".
namestringYesNames a value under variables — e.g. home.score.
rowsnumberHow many rows the table shows.

Panel ​


import { Panel } from '@single-studio/core/control'

A titled group of controls that arranges itself. The controls sit side by side and drop onto the next line when they run out of room, so one board works both in a narrow OBS dock and full screen on a second monitor without you writing a layout for either.

jsx
<Panel title="Scores">
  <Field name="home.name" label="Home" />
  <Stepper name="home.score" label="Home score" />
</Panel>
PropTypeRequiredDescription
childrenReactNodeControls. They sit side by side and wrap onto the next line as needed.
classNamestringAdded to the component's own classes.
titlestringHeading for the group.

Break ​


import { Break } from '@single-studio/core/control'

Forces a line break inside a Panel, for when the natural wrap puts related controls on different rows.

jsx
<Panel title="Scores">
  <Stepper name="home.score" label="Home" />
  <Break />
  <Select name="period" options={PERIODS} />
</Panel>
PropTypeRequiredDescription
classNamestringAdded to the component's own classes.

Confirm ​


import { Confirm } from '@single-studio/core/control'

A destructive button that asks first, without a dialog: one click arms it, a second does it, and a few seconds of silence disarms it. Exported for actions of your own — the built-in controls that destroy something already ask on their own, so reach for this when a mutation you wrote needs the same care.

jsx
<Confirm label="Remove all" onConfirm={() => library.removeAll()} />
jsx
// Reversible, so it warns rather than alarms, and says its own thing when armed
<Confirm label="Disconnect" tone="warn" ask="Leave the room?" onConfirm={leave} />
jsx
// Ordinary enough not to shout, and off while there is nothing to do
<Confirm label="Clear queue" tone="quiet" disabled={!queue.length} onConfirm={clear} />
jsx
// The children form, for a button that is an icon rather than a sentence
<Confirm tone="danger" ask="Again to delete" onConfirm={remove} aria-label="Delete">
  <Icon name="trash" />
</Confirm>
PropTypeRequiredDescription
askstringWhat it says once armed. Defaults to "Click to confirm".
childrenReactNodeReplaces label when idle.
classNamestringAdded to the component's own classes.
disabledbooleanNothing happens on click.
labelstringWhat the button says when idle.
onConfirm() => voidYesCalled on the second click.
tone'danger' | 'warn' | 'go' | 'primary' | 'quiet'What the button means. Defaults to "danger".

Hotkeys ​


import { Hotkeys } from '@single-studio/core/control'

Lets an operator choose which keys save and discard. Ctrl/Cmd+S is a default rather than a rule — it collides with habits from other software, and on some layouts it is awkward — and discard can be put on a key too, which it is not by default. Bindings belong to the operator rather than the show, so rebinding one does not move anybody else's, and they are stored with the studio rather than the machine, so they travel with it. The board's menu already offers this, so place the panel only if you want it on the board itself.

jsx
<Panel title="Shortcuts">
  <Hotkeys />
</Panel>
PropTypeRequiredDescription
classNamestringAdded to the component's own classes.

Source ​

What goes on air — @single-studio/core/source. Each of these lives in a graphic under src/sources/, one file per OBS browser source, wrapped in a Scene. They read the same paths the control surface writes and render nothing until the value has arrived, so a graphic reopening mid-show never flashes a placeholder over the programme.

Scene ​


import { Scene } from '@single-studio/core/source'

The root of a graphic — one per OBS browser source. vars maps CSS custom properties to values an operator controls, which is how a graphic follows input the framework has no component for.

jsx
export default function Scoreboard() {
  return (
    <Scene>
      <Variable name="home.name" fallback="Home" />
    </Scene>
  )
}
jsx
// A team colour driving anything the stylesheet can express
<Scene vars={{ '--home': 'home.color' }}>
  <div style={{ background: 'var(--home, #0a3161)' }} />
</Scene>
PropTypeRequiredDescription
childrenReactNodeThe graphic.
classNamestringAdded to the component's own classes.
heightnumber | stringA fixed height. A number is pixels; a string is used as written.
varsRecord<string, string>CSS custom property to value name, e.g. { "--accent": "home.color" }.
widthnumber | stringA fixed width. A number is pixels; a string is used as written.

Variable ​


import { Variable } from '@single-studio/core/source'

One value on air, as text. This is the component most graphics are mostly made of — a name, a score, a subtitle.

jsx
<Variable name="home.name" fallback="Home" />
jsx
// Shrink to fit rather than overflow a fixed box
<Variable name="guest.title" fallback="Guest" fit />
jsx
<Variable name="lowerthird.headline" fallback="" />
PropTypeRequiredDescription
asstringThe element to render. Defaults to "span", so a value can sit inside a sentence.
classNamestringAdded to the component's own classes.
fallbackstringShown when the value is empty. Defaults to "".
fitboolean | numberShrink the text to fit its box. A number caps how far.
namestringYesNames a value under variables — e.g. home.score.
transitionstringMotion variants, space-separated — e.g. "slide-up ease-back". See the transitions guide.

Image ​


import { Image } from '@single-studio/core/source'

A picture chosen by a value the operator controls. Loads and decodes off-screen first and only swaps once ready, so a change never leaves a hole on air.

jsx
// No `src`: the stored value is the URL, or an `asset:` key from the library
<Image name="sponsor.logo" alt="" />
jsx
// Templated: "Single Studio" resolves /logos/single-studio.svg
<Image name="home.name" src="/logos/:value:.svg" slug fallback="/logos/tbd.svg" />
jsx
// `value` instead of `name`: a plain string, not a path. Nothing is read from
// the store, so this is for a component already holding the value itself.
<Image value="https://cdn.example.com/acme.svg" alt="Acme" />
<Image value="asset:acme-logo" alt="Acme" />
<Image value="vanguard" src="./factions/:value:.svg" alt="Vanguard" />
PropTypeRequiredDescription
altstringAlt text.
classNamestringAdded to the component's own classes.
fallbackstringURL used when the value is empty or fails to load.
fit'cover' | 'contain' | 'fill' | 'none' | 'scale-down'Fill the box this way instead of sitting inside it — "cover" for a backdrop.
namestringYesNames a value under variables — e.g. home.score.
slugbooleanSlugify the value first — "Single Studio" becomes single-studio.
srcstringURL template; :value: is replaced. Defaults to ":value:", so a pasted URL just works.
transitionstringMotion variants, space-separated — e.g. "slide-up ease-back". See the transitions guide.
valuestringA value outright rather than a path to one. Wins over name.

ImageList ​


import { ImageList } from '@single-studio/core/source'

Several pictures from one value — what ImageSelect multiple writes. Each entry is templated exactly as Image templates one.

jsx
<ImageList name="home.army" src="/units/:value:.svg" slug />
jsx
// Cap what goes on air, whatever the operator picked
<ImageList name="home.army" limit={8} itemClassName="h-10 w-10" />
PropTypeRequiredDescription
altstringAlt text for every image.
classNamestringAdded to the component's own classes.
fallbackstringURL used for an entry that fails to load.
itemClassNamestringAdded to each image rather than to the list.
limitnumberRender at most this many entries.
namestringYesNames a value under variables — e.g. home.score.
slugbooleanSlugify each value first — "Single Studio" becomes single-studio.
srcstringURL template; :value: is replaced by each entry. Defaults to ":value:".
transitionstringMotion variants, space-separated — e.g. "slide-up ease-back". See the transitions guide.

Slideshow ​


import { Slideshow } from '@single-studio/core/source'

A folder of pictures, playing. What a standby screen is made of.

jsx
<Slideshow group="slides" every={9} order="shuffle" />
jsx
// The folder, unless the operator has picked from it
<Slideshow group="slides" name="standby.slides" every="0:12" />
PropTypeRequiredDescription
classNamestringAdded to the component's own classes.
everystring | numberHow long each picture holds — seconds, or "m:ss". Defaults to 8.
fit'cover' | 'contain'How a picture fills the frame. Defaults to "cover".
groupstringPlays everything in the image library filed under this group — "slides" reads slides/….
limitnumberPlay at most this many.
namestringNames a list under variables — e.g. standby.slides. Takes over from group whenever it holds anything.
order'sequence' | 'shuffle'In order, or a fresh deal each pass. Defaults to "sequence".
preloadnumberHow many either side of the current one hold a decoded image. Defaults to 1.

Tally ​


import { Tally } from '@single-studio/core/source'

A number said in icons. Three demolitions is three icons, not the word three.

jsx
<Tally name="home.demolitions" src="./icons/demo.svg" />
jsx
// A best-of-five: three to win, won ones filled
<Tally name="home.games" of={3} src="./pips/won.svg" empty="./pips/empty.svg" />
jsx
// The race length is the operator's
<Tally name="home.games" of="series.wins" src="./pips/won.svg" />
PropTypeRequiredDescription
altstringAlt text for every mark.
classNamestringAdded to the component's own classes.
emptystringThe mark for one not yet filled. Without it an unfilled mark holds its space and shows nothing.
itemClassNamestringAdded to each mark rather than to the row.
maxnumberThe most marks to draw without an of. Defaults to 12; 0 for no bound.
namestringYesNames a count under variables — e.g. home.demolitions.
ofnumber | stringDraw this many marks and fill the count — a number, or a path an operator sets.
srcstringYesThe mark. A path, a URL, or a library entry, the same as Image takes.
transitionstringMotion variants for a mark arriving or filling, space-separated — e.g. "zoom ease-back". See the transitions guide.

Toggle ​


import { Toggle } from '@single-studio/core/source'

Shows its children while a toggle is on, and animates them in and out. This is how a whole graphic is put on and taken off air.

jsx
<Toggle name="lowerthird">
  <LowerThird />
</Toggle>
jsx
<Toggle name="stats" transition="slide-up ease-back">
  <StatsCard />
</Toggle>
PropTypeRequiredDescription
childrenReactNodeRendered always; visible while the toggle is on.
classNamestringAdded to the component's own classes.
namestringYesNames a value under toggles — e.g. lowerthird.
transitionstringMotion variants, space-separated — e.g. "slide-up ease-back". See the transitions guide.

Timer ​


import { Timer } from '@single-studio/core/source'

A clock on air, reading whichever kind was stored — a countdown, a count-up, or a paused one. A finished countdown takes itself off air; nobody has to remember to clear it mid-show.

jsx
<Timer name="round" fallback="--:--" />
jsx
// Red once the segment has run past two minutes
<Timer name="segment" limit="2:00" className="text-white [&[data-over]]:text-red-500" />
jsx
// Do something when the clock runs out
<Timer name="break" onComplete={() => setScene("live")} />
PropTypeRequiredDescription
asstringThe element to render. Defaults to "span".
classNamestringAdded to the component's own classes.
fallbackstringShown when no clock is set. Defaults to "00:00".
limitstring | numberHow long a count-up may run — "2:00", or seconds. Past it, the element gets data-over and ss-over.
namestringYesNames a value under timers — e.g. round.
onComplete() => voidCalled once, when a countdown reaches zero.
transitionstringMotion variants, space-separated — e.g. "slide-up ease-back". See the transitions guide.

Ticker ​


import { Ticker } from '@single-studio/core/source'

Text scrolling across the bottom of the screen, looping continuously. Speed is in pixels per second, so a long crawl and a short one read at the same pace.

jsx
<Ticker name="headlines" />
jsx
<Ticker name="headlines" speed={60} fallback="" className="text-2xl" />
PropTypeRequiredDescription
classNamestringAdded to the component's own classes.
fallbackstringShown when the value is empty.
namestringYesNames a value under variables — e.g. home.score.
speednumberPixels per second. Defaults to 100.

Clock ​


import { Clock } from '@single-studio/core/source'

The time of day, from the machine the graphic is running on. Nothing replicates here — every browser source reads its own clock.

jsx
<Clock />
jsx
<Clock locale="en-GB" options={{ hour: '2-digit', minute: '2-digit' }} />
jsx
// Another city's time, named, for a show with a remote guest
<Clock options={{ timeZone: 'America/New_York', timeStyle: 'short', timeZoneName: 'short' }} />
PropTypeRequiredDescription
asstringThe element to render. Defaults to "span".
classNamestringAdded to the component's own classes.
localestringA BCP 47 language tag, e.g. en-GB. Defaults to the browser's.
optionsIntl.DateTimeFormatOptionsPassed straight to Intl.DateTimeFormat.

MIT licensed