Custom Viewer Positioning with refs
developYou can override the default layout by using the refs prop and the children render pattern. This allows you to render the Linear and Circular components separately in your own layout (e.g., stacking them vertically).
import { useRef } from "react";
import { Circular, Linear, SeqViz } from "seqviz";
export default () => {
const circular = useRef();
const linearRef = useRef();
return (
<SeqViz name="J23100" seq="TTGACGGCTAGCTCAGTCCTAGGTACAGTGCTAGC" refs={{ circular, linear }}>
{({ circularProps, linearProps, ...props }) => (
<div style={{ display: "flex", flexDirection: "column", width: "100%" }}>
<div ref={linear} style={{ height: "25%", width: "100%" }}>
<Linear {...linearProps} {...props} />
</div>
<div ref={circular} style={{ height: "75%", width: "100%" }}>
<Circular {...circularProps} {...props} />
</div>
</div>
)}
</SeqViz>
);
};