On this page

Open source library

manimater-components is the library behind every Manimater video: 91 tested, reusable Manim animation components across 12 subjects, each driven by plain JSON. It is MIT licensed, and you can use it with or without Manimater.

Package
manimater-components
Python
3.10+
Manim
0.19+
Licence
MIT
A component call
// A component is a name plus parameters. No animation code.
{ "component": "synchronous_motor", "params": { "poles": 2, "frequency_hz": 50 } }

An LLM, or you, only picks a component and fills in its parameters. manimate.storyboard validates every value against the catalog before anything runs, so nothing arbitrary is executed. Every component ships an example that must render, and CI dry-runs all of them against a real Manim scene.

Installation

You need Python 3.10 or newer and the system packages Manim depends on (ffmpeg, Cairo and Pango; LaTeX is only needed by components that typeset equations). See the Manim installation guide for your platform.

Install from source
git clone https://github.com/bishnt/manimater-components && cd manimater-components
pip install -e ".[dev]"
./scripts/install_plugins.sh        # optional: the community Manim packages some components wrap

The library depends on manim>=0.19,<1.0 and pydantic>=2.6. install_plugins.sh is optional: it installs the community Manim packages that 27 of the components wrap.

Quick start

Render any component from its own example, or from parameters you pass in:

Preview a component
python -m manimate.preview --list        # every component
python -m manimate.preview callout       # renders previews/callout.mp4 from the component's own example
python -m manimate.preview bar_chart --params '{"labels": ["a", "b"], "values": [3, 5]}' --seconds 8 --quality medium
FlagWhat it does
--listList every component and exit.
--paramsA JSON object of parameters. Default: the component's own example.
--secondsScene length in seconds. Default 8.
--qualitylow, medium or high. Default low.
--outOutput folder. Default previews; the video lands in previews/<name>.mp4.

Use it from Python:

Python
from manimate import registry
from manimate.components import load_all
from manimate.storyboard import validate

load_all()                                   # registers every component
comp = registry.get("bar_chart")
print(comp.example)                          # parameters that are known to render

storyboard, errors = validate({
    "title": "Demo",
    "scenes": [
        {"component": "bar_chart", "params": comp.example, "narration": "Synchronous speed by pole count."},
    ],
})
# storyboard is None when errors is not empty

How it fits together

Four ideas make up the library. A component is one animation. A storyboard is a list of scenes that each name a component. The catalog is the machine-readable menu of components. Validation sits between them, so a storyboard that passes is safe to render.

Component

A Python function fn(ctx, **params) that draws one animation, registered with @component(name, description, params, example, domain). The registry turns that one declaration into parameter validation, the catalog and the docs. Components are pure drawing code and one idea each.

Storyboard

The JSON a planner (an LLM or a person) produces. validate() checks it and returns (storyboard, errors); the storyboard is None when there are errors.

Storyboard
{
  "title": "How a synchronous motor works",
  "scenes": [
    { "component": "title_card", "params": { "title": "Synchronous motors" }, "narration": "Why does the rotor lock to the field?" },
    { "component": "synchronous_motor", "params": { "poles": 2, "frequency_hz": 50 }, "narration": "..." }
  ]
}
FieldRule
titleRequired, at most 120 characters.
scenesBetween 1 and 12 scenes.
scenes[].componentMust be a component in the registry.
scenes[].paramsValidated against that component's declared parameters.
scenes[].narrationAt most 400 characters. Scene length follows it: about 2.6 words per second plus 1.5 s, kept between 4 and 18 s.

A storyboard is rejected when its estimated length is over 150 seconds.

Catalog

catalog.json lists every component with its name, domain, description, parameters and a known-good example. Hand it to an LLM as the menu it picks from. Regenerate it with python -m manimate.catalog > catalog.json; CI fails if it is out of date. Components that wrap a community plugin also carry a plugin entry with its name, URL and licence.

One catalog entry
{
  "name": "bar_chart",
  "domain": "general",
  "description": "A simple bar chart comparing 2-8 values.",
  "params": {
    "title":  { "type": "string",   "required": false, "description": "Chart title", "default": "" },
    "labels": { "type": "string[]", "required": true,  "description": "Category names" },
    "values": { "type": "number[]", "required": true,  "description": "One number per label" },
    "unit":   { "type": "string",   "required": false, "description": "Unit shown after each value, e.g. 'rpm'", "default": "" }
  },
  "example": { "title": "Synchronous speed at 50 Hz", "labels": ["2 poles", "4 poles", "6 poles"], "values": [3000, 1500, 1000], "unit": "rpm" }
}

Parameter validation

registry.validate_params(comp, params) returns (clean_params, errors). Unknown parameters are dropped, defaults are filled in, and choices and custom validators are enforced.

TypeAccepts
stringText, at most 300 characters.
numberAny int or float (not a boolean).
integerA whole number.
booleantrue or false.
string[]A list of strings, at most 8 items.
number[]A list of numbers, at most 8 items.
object[]A list of objects, at most 8 items.

Writing a component

Copy _template.py into manimate/components/community/. Files in that folder are loaded automatically; files starting with an underscore never are. The template is a complete, working component (a chain of labelled steps that lights up one by one). For a finished example, read callout in manimate/components/general.py.

Start a component
cp manimate/components/community/_template.py manimate/components/community/my_component.py
# edit it, then:
python -m manimate.preview my_component        # watch it: previews/my_component.mp4
python -m pytest                               # includes a dry run of every component
python -m manimate.catalog > catalog.json      # regenerate the catalog (CI checks it)

Anatomy

@component
@component(
    "step_chain",                                  # name: snake_case, unique in the whole library
    "A row of 2-6 labelled steps that light up one after another.",   # what it shows and when to use it
    {                                               # params, at most 5
        "steps": P("string[]", "The step names, in order", required=True, validator=...),
        "title": P("string", "Optional heading", default=""),
    },
    {"steps": ["Plan", "Build", "Test", "Ship"], "title": "A release"},   # example: must render
    domain="general",                               # subject area
)
def step_chain(ctx: Ctx, steps: list[str], title: str = "") -> None:
    ...

At most five parameters. Describe every one well: an LLM reads these descriptions to decide what to put in them.

Parameters

Declare each parameter with P(type, description, required=, default=, choices=, validator=, item_hint=). The types are the ones in the validation table. Add choices=[...] to restrict a value, or a validator that returns an error message (or None) to be stricter. For object[], use item_hint to tell the planner what each item looks like.

The Ctx object

MemberUse
ctx.play(*anims, run_time=)Play animations and track the time spent. Always use this instead of scene.play.
ctx.wait(s)Hold for s seconds, tracked.
ctx.remainingSeconds left in this scene. Spend them: the narration is that long.
Ctx.beat(remaining, n)Seconds per reveal when n reveals share the remaining time.
ctx.fit(mob)Scale down to fit the stage and centre it. The stage is about 12.4 x 5.8 units; the bottom is for the caption.
ctx.heading(text)A standard heading.
label(text, size, color, width=)Text with word wrap.

Colours come from manimate.theme: FG, MUTED, PANEL, ACCENT, GOOD, WARN, DANGER, YELLOW, PURPLE. Never write hex colours.

Rules

  1. One idea per component, and a description a planner can match to a topic.
  2. Computed, not drawn. Algorithms, formulas and layouts are plain functions you can unit-test without Manim. The scene only plays the result.
  3. Fade in as a whole. The finished picture appears with one FadeIn (1.2 to 1.5 s), then the parts that carry the meaning animate.
  4. Fill the time you are given; do not run over it.
  5. Forgiving parameters. Clamp and trim instead of crashing. Empty lists, huge numbers and very long labels must not break it.
  6. Plain labels, under 28 characters where possible.
  7. Pure drawing code. No network, files, subprocesses, eval or exec.

Wrapping a Manim plugin

Only MIT (or Creative Commons) licensed plugins. Import the plugin inside the function through from ._plugin import require so the library still imports without it. Declare it in manimate/plugins.py, pin it in scripts/install_plugins.sh, add a row to THIRD_PARTY.md, and pass plugin= to @component so the catalog and this site can credit it. physics.py is an example.

Testing

Test it
python -m manimate.preview my_component                              # look at it
python -m manimate.preview my_component --params '{"steps": ["a"]}'   # try awkward input
python -m pytest tests/community                                      # generic checks on every community component
python -m manimate.catalog > catalog.json

Put logic tests in tests/community/test_my_component.py and cover the edge cases: empty, one item, the maximum, long labels.

Community files are also checked statically. The check reads your source with ast and never imports or runs it. It rejects calls such as eval, exec and open, and imports outside an allow-list (Manim, NumPy, a few standard-library modules, and the library's own modules). It guards against honest mistakes; a maintainer still reads every contribution.

CI runs the fast tests (including a dry run of every component), checks that catalog.json and the generated docs are up to date, and runs the slow tests that render real video in a separate job (pytest -m slow).

Ways to contribute

New components are the best way to help, and you do not have to code. AI-assisted contributions are welcome; you are responsible for what you submit, so run it and watch the video before you send it.

You are...Do this
Comfortable with PythonFork, add one file to manimate/components/community/, open a pull request.
Not a programmer, with an ideaDescribe the animation to any LLM, then open the New component (from an LLM) issue. A bot turns it into a pull request for you.
Someone who found a gap or a bugOpen an issue: Bug report or Component request.

As a developer

Fork, build, test
git clone https://github.com/<you>/manimater-components && cd manimater-components
pip install -e ".[dev]"            # needs ffmpeg, Cairo and Pango for Manim
cp manimate/components/community/_template.py manimate/components/community/my_component.py
python -m manimate.preview my_component
python -m pytest
python -m manimate.catalog > catalog.json

Then open a pull request. Answer five questions in its description (the template asks them): what the component teaches, its params (names, types, ranges, defaults), its layout, its beats (the animation in order, with rough seconds), and its failure cases (too many items, empty input, very long labels).

Without coding

  1. Open Generate with an LLM and copy the prompt into Claude, ChatGPT, Gemini or any LLM. Describe the animation you want in plain words, and be specific about what should change on screen.
  2. The LLM gives you one block of Python. If you can run Python, preview it; if not, skip this, because CI renders it for you.
  3. Open the New component (from an LLM) issue form and paste the code in.

A bot checks your code (it never runs it), opens a pull request, and CI renders and tests it. A maintainer reviews it and may ask you, or the LLM, for changes. You keep credit: your GitHub name is on the commit.

Pull request checklist

  • One idea per component. If the description needs the word “and” twice, split it.
  • At most 5 parameters, each with a default or clearly required, and a plain-English error for bad values.
  • The example renders (preview it) and the dry-run test passes.
  • Only theme colours; text stays on the stage (ctx.fit) and is short and plain.
  • The animation uses the time it is given (ctx.remaining, Ctx.beat) and fades in as a whole.
  • Any algorithm, formula or layout is a plain Python function with a unit test.
  • No network, files, processes, or eval/exec. A wrapped Manim plugin must be MIT (or CC) licensed and recorded in the three places above.
  • catalog.json regenerated.

After it is merged

When a pull request is merged, CI proposes the same change to Manimater so the app and this library never drift. By contributing you agree your work is released under the MIT licence. Please also read the code of conduct; report security problems as the security policy describes.

Subjects

91 components across 12 subjects today. Missing yours? That is the best kind of contribution. Each subject links to its components, with parameters and example renders.

Repository layout

PathWhat it is
manimate/components/Component packs, one module per subject. Each registers itself with the registry.
manimate/components/community/Your contribution goes here: one file per component, loaded automatically.
manimate/viz/Lower-level 3Blue1Brown-style building blocks: core, ml_advanced, microelectronics, signals, power, finance.
manimate/registry.py, ctx.py, theme.pyThe @component decorator, the per-scene time budget and layout helpers, the colours.
manimate/storyboard.py, catalog.pyValidate JSON against the library; export catalog.json.
manimate/preview.pyRender one component to an MP4.
skills/manimater-components/The Claude skill.
tests/Fast tests, plus a dry run of every component.

Use it with Claude

The repository ships a Claude skill, skills/manimater-components. It teaches Claude to pick components from the catalog, write valid storyboards, preview them, and write new components that follow the rules above. In Claude Code it is picked up automatically when you open the repository (.claude/skills/). In claude.ai, upload the folder under Settings, Capabilities, Skills.

Licence and credits

The library is released under the MIT licence. 27 components draw with 7 open source Manim plugins; each plugin keeps its own licence and belongs to its authors. They are credited by name on the components page and in THIRD_PARTY.md.