Skip to main content

DappletContextPicker

DappletContextPicker is a component that enables context picking mode, provides latches for specific contexts, and onClick callback functions.

Demos

tip

For examples and details on the usage of this React components, visit the feature demo page:

Picker

Basic usecase

You don't need to import the component. It's available in the NEAR Components through the Layout Managers.

<DappletContextPicker onClick={onClick} LatchComponent={LatchComponent} />

Props

NameTypeOptionalDescription
targetTarget or Target[]✔️The set of target contexts that will be highlighted and available for selection. By default, all contexts on the page provided by the available adapters will be active for Picker.
onClick(ctx: TransferableContext) => void✔️A callback that will be called when the context is clicked.
LatchComponentReact.FC<LatchProps>✔️Adding a Latch component. Contexts with Latch become interactive. onClick is called when the Latch is clicked.