Mixins / Inside-out composition

The five-term mental model

You can understand the package with five terms:

TermMeaning
SlotOne named extension point in a view.
SlotsThe public contract describing all extension points and what each permits.
StyleAppearance attached from outside: classes, inline declarations and CSS rules.
BehaviorElement-level interaction attached from outside: attributes and an optional Foldkit Mount. Never application state.
SlotViewThe pure Foldkit view that renders those slots.

Style and Behavior compile to one internal Mixin representation. A resolver combines the contributions and enforces ownership rules before ordinary Foldkit attributes reach the renderer.

mermaid
flowchart TB
  component["component / SlotView"]
  slots["Slots contract<br/>where customization is allowed"]
  styling["Style<br/>how it looks"]
  behavior["Behavior<br/>how the element reacts"]
  resolver["Resolver<br/>merge + ownership checks"]
  attrs["ordinary Foldkit attributes"]

  component --> slots
  slots --> styling
  slots --> behavior
  styling --> resolver
  behavior --> resolver
  resolver --> attrs