Mixins / Inside-out composition
Five concepts that fit together
| Term | Role |
|---|---|
| Slot | One named extension point in a view |
| Slots | Contract listing all slots and what each permits |
| Style | External appearance: classes, styles, and CSS rules |
| Behavior | External DOM interaction: attributes and optional Mount |
| SlotView | Pure 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.
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