Overview#
Here are my notes on how to use the Universal Viewer npm package in Next.js.
Installation#
Install with the following command.
Implementation#
Since it uses useEffect, it appeared necessary to implement it as a client component.
Also, by adding the uv class to the div tag, the CSS was applied correctly.
There may be other available options, but I was able to specify the canvas index to initially load with cv and the display rectangle with xywh.
Summary#
I hope this serves as a helpful reference for using Universal Viewer.