Install
useLogoSoup Composable
Reactive Options
Every option accepts a plain value, aref, or a getter function (MaybeRefOrGetter). The composable auto-tracks dependencies via watchEffect and re-processes whenever any option changes.
Options Type
toValue() internally.
Return Value
All return values are reactive. Reading them in a template or
watchEffect automatically tracks changes.
Visual Center Alignment
Apply visual center alignment with thegetVisualCenterTransform helper from the core package:
Using in Effect Scopes
The composable usesonScopeDispose (not onUnmounted) for cleanup, so it works correctly inside any Vue effect scope, not just components. This means you can use it in composables that create their own effectScope:
How It Works Under the Hood
The Vue adapter creates a corecreateLogoSoup engine instance and bridges it to Vue’s reactivity system:
shallowRefholds the engine’s state snapshot (notref, since the snapshot is an immutable object that doesn’t need deep reactivity)watchEffectauto-tracks which options are read and re-runsengine.process()when they changeonScopeDisposeunsubscribes and destroys the engine when the scope is torn downcomputedrefs derive convenience properties (isLoading,isReady, etc.) from the shallow ref