@mocanvas/mocanvas · function

useRelevantStyles

declare function useRelevantStyles(): SharedStyleMap | null

The styles the style panel should offer, and their shared values.

With a selection this is what the selected shapes have in common; with nothing selected it is what the active tool is about to create. null means there is nothing to show — which a panel renders as nothing at all, rather than as an empty frame.

mocanvas is built by Symbio. Free for non-commercial, non-profit and development use; commercial use needs an agreement. Not affiliated with or endorsed by tldraw.