When to use it
- Controls that act on the whole canvas and stay put while it pans and zooms underneath: zoom, fit, center, a layer or view switch.
- A canvas the product draws itself.
NbBlueprintControlsis this component with the blueprint's own commands already wired.
Not for controls that follow a selection (use NbFloatingToolbar) or for a strip above a table or panel (use NbToolbar).
Anatomy
NbCanvasControlsis the set. It floats atposition(top-left,top-center,top-right,bottom-left,bottom-center,bottom-right), one inset from the canvas edge, and stacks its groups alongorientation.NbCanvasControlsGroupis one island. Put related controls in one group (zoom and fit), and unrelated ones in another (alignment). A group shown only sometimes, such as alignment while two items are selected, is a separate group with av-if.
Guidelines
- Icon buttons are ghost
NbButtons with alabel, which is their name and their tooltip. Zoom ismagnifying-glass-plusandmagnifying-glass-minus, fit isframe-corners. - Leave
sizeon the buttons alone: the set gives every button inside the same height (smby default). A select or a field in a group takessize="sm"to match, andvariant="fluid"puts its label inside it. - One set per corner. Two sets in the same corner overlap.