Skip to main content

React.js

Install#

npm install @upsetjs/react react react-dom

or

yarn add @upsetjs/react react react-dom

Example#

Live Editor
Result

Properties#

The most relevant and required properties of the UpSetJS component are:

interface UpSetJSProps {
width: number;
height: number;
sets: ISet<T>[];
combinations?: ISetCombination<T>[] | GenerateCombinationOptions<T>;
selection?: ISetLike<T> | readonly T[] | null;
onHover?(selection: ISetLike<T> | null): void;
onClick?(selection: ISetLike<T> | null): void;
queries?: UpSetQuery<T>[];
}