Skip to content
docsv0.31.1

BrandMarkComponent

The house's mark, as a component that reports what the surface is doing. It lives beside the tokens, the faces and the wordmark rather than with the form primitives, because it is the design system's and not a generic input: a surface that has the house's vocabulary can have its mark, and one that has neither has no use for either. Its three states are one plant, not a spinner with a logo on it — sown on arrival, growing while something is waited for, opening once when it is ready. That is why the mark can BE the loader instead of standing next to a borrowed one, and why reduced-motion still gets the state. The thirteen grains carry their sowing index as `--i`, and the stylesheet's wave reads the same index, so the order the mark is drawn in and the order it animates in cannot drift apart.

BrandMarkComponent::contract()

public static function contract(): Milpa\Live\ValueObjects\ComponentContract

The mark's runtime contract, including the stylesheet it ships beside this file.

BrandMarkComponent::grains()

public static function grains(): array

The grains and their sowing index, for a renderer to draw.

BrandMarkComponent::mount()

public function mount(array $props, Milpa\Live\ValueObjects\ComponentContext $context): Milpa\Live\ValueObjects\StateSnapshot

Mounts the mark in the state the surface asked for, carrying its accessible label.

Parameters

Parameters of mount()
NameTypeDescription
$propsarray
$contextMilpa\Live\ValueObjects\ComponentContext

BrandMarkComponent::handle()

public function handle(Milpa\Live\ValueObjects\InteractionRequest $request): Milpa\Live\ValueObjects\InteractionResult

Moves the mark to another state — the same admissibility as mounting, so a payload cannot reach a state that props could not.

Parameters

Parameters of handle()
NameTypeDescription
$requestMilpa\Live\ValueObjects\InteractionRequest