Mixins / Inside-out composition
The five-term mental model
You can understand the package with five terms:
| Term | Meaning |
|---|---|
| Slot | One named extension point in a view. |
| Slots | The public contract describing all extension points and what each permits. |
| Style | Appearance attached from outside: classes, inline declarations and CSS rules. |
| Behavior | Element-level interaction attached from outside: attributes and an optional Foldkit Mount. Never application state. |
| SlotView | The 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