This page documents
@whop/elements@1.0.0-beta.0 and @whop/elements-react@1.0.0-beta.0.- Web
- Swift
Mounts inside
Runs when the grouped loading state changes. The value is
Merges new props and callbacks into the sub-controller.Signature:
Destroys the sub-controller and its elements, then frees its exclusive slot. A later
Wallet. Create it to get a handle, then mount its elements on that handle. Call destroy() to remove the sub-controller. Create it again to get a fresh handle.Preview
A live, interactive demo of this sub-controller’s default arrangement with example data:Options
Pass these towallet.create('balances', { … }), or as props on <Balances> in React. Parent-injected props never appear here.Balances takes no options.Events
Pass callbacks in the create options or React props.onLoadingChange
Runs when the grouped loading state changes. The value is true while any mounted element is still loading.Signature: ((loading: boolean) => void)Methods
Call these on the sub handle fromwallet.create('balances', { … }).update
Merges new props and callbacks into the sub-controller.Signature: (options: Partial<BalancesSubOptions>) => voiddestroy
Destroys the sub-controller and its elements, then frees its exclusive slot. A later create("balances") starts fresh.Signature: () => voidElements
The elements this sub-controller mounts. Each has its own page:BalanceElement
An account’s balance and a chart of how it changed. The total and its change sit at the top, the chart below that, and the time range buttons at the bottom. The viewer can read individual points on the chart and switch the time range themselves.
ListElement
The holdings behind an account’s balance. Every currency and token gets its own row, showing its name and its value in dollars, largest first. Rows can report which one the viewer tapped, so you can open your own screen for it.

