useElements()
The provider’s Elements group, or null until the client has loaded.
function useElements(): Elements | nullReturns
Section titled “Returns”Elements | null: The provider’s elements group, or null until the client has loaded. Throws outside a provider.
Example
Section titled “Example”const elements = useElements();const openGuide = () => elements?.getElement("sizeGuide")?.open();Was this page helpful?
Thank you. We read every answer.