git404hub

what is macro-components fr?

gaearon/macro-components — explained in plain English

Analysis updated 2026-07-17 · repo last pushed 2018-01-31

5JavaScriptAudience · developerComplexity · 2/5DormantSetup · easy

tl;dr

A React library that lets you build composite UI components (like cards or banners) by defining a layout once, so children slot in automatically without custom props.

vibe map

mindmap
  root((repo))
    What It Does
      Define layout once
      Auto-slot children
      No custom props
    Tech Stack
      JavaScript
      React
    Use Cases
      Design systems
      Reusable UI patterns
      Cards and banners
    Audience
      Component library authors
      Design system builders
    Extras
      Clone utility
      Works with styled-components

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

what do people make with this?

VIBE 1

Build a reusable Banner component where Heading and Subhead children automatically slot into place.

VIBE 2

Create a design-system component library without writing elaborate prop APIs for every layout variant.

VIBE 3

Use the Clone utility to apply default styling to child elements passed into a layout.

what's the stack?

JavaScriptReact

how it stacks up fr

gaearon/macro-components00kaku/wp-rest-playgroundchalarangelo/mini-active-record
Stars555
LanguageJavaScriptJavaScriptJavaScript
Last pushed2018-01-31
MaintenanceDormant
Setup difficultyeasyhardeasy
Complexity2/53/51/5
Audiencedeveloperdevelopervibe coder

Figures from each repo's GitHub metadata at analysis time.

how do i run it?

Difficulty · easy time til it works · 30min

prompts (copy fr)

prompt 1
Show me how to use macro() to turn a layout function into a React component.
prompt 2
Help me build a Card component with macro-components that accepts Image, Title, and Description children.
prompt 3
How does macro-components figure out which child goes where without custom props?
prompt 4
Show me how to use the Clone utility to set default styles on optional children.

Frequently asked questions

what is macro-components fr?

A React library that lets you build composite UI components (like cards or banners) by defining a layout once, so children slot in automatically without custom props.

What language is macro-components written in?

Mainly JavaScript. The stack also includes JavaScript, React.

Is macro-components actively maintained?

Dormant — no commits in 2+ years (last push 2018-01-31).

How hard is macro-components to set up?

Setup difficulty is rated easy, with roughly 30min to a first successful run.

Who is macro-components for?

Mainly developer.

peek the repo → explain another one

This repo across BitVibe Labs

double-check against the repo, no cap.