Mixins / Inside-out composition

Five concepts that fit together

TermRole
SlotOne named extension point in a view
SlotsContract listing all slots and what each permits
StyleExternal appearance: classes, styles, and CSS rules
BehaviorExternal DOM interaction: attributes and optional Mount
SlotViewPure Foldkit view rendering through those slots

Style and Behavior both compile to Mixin values. Before Foldkit renders attributes, the resolver merges all attached mixins and enforces single-owner conflict rules.

component / SlotViewSlots contractwhere customization isallowedStylehow it looksBehaviorhow the element reactsResolvermerge + ownership checksordinary Foldkit attributes
Diagram source
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