Build a Themed UI Kit

Abstract Factory pattern

Challenge 4 of Create & Share ObjectsIntermediate~55 minFree

Build a themed UI kit -- Light and Dark -- using the Abstract Factory pattern. You will define matching families of Button and Checkbox products, hide them behind interchangeable factories, and write a single client plus a registry that produce a consistent widget family for whichever theme you pick.

5 steps

  1. 1Product interfaces and the Light family
  2. 2The Dark family
  3. 3The abstract factories
  4. 4A theme-agnostic client
  5. 5Selecting a family by name
Start step 1