> For the complete documentation index, see [llms.txt](/llms.txt).

- Snap

# snap_updateInterface

Update an interactive interface. For use in [interactive UI](https://metamask-docs-git-imp-agt-scr-90-100-consensys-ddffed67.vercel.app/snaps/features/custom-ui/interactive-ui/).

## Parameters[​](#parameters "Direct link to Parameters")

object

required

An object containing the parameters for the `snap_updateInterface` method.

### id

string

required

The ID of the interface to update.

### ui

JSXElement

required

The new custom UI content to display in the interface.

### context

Record<string, JSON>

Optional context for the interface, which can be used to provide additional information about the interface to the Snap, without being part of the UI itself.

## Returns[​](#returns "Direct link to Returns")

null

This method does not return any data, so the result is always `null`.

## Example

```
import { Box, Heading, Text } from '@metamask/snaps-sdk/jsx'

// First, create an interface and get its ID.
const id = await snap.request({
  method: 'snap_createInterface',
  params: {
    ui: <Box>...</Box>,
  },
})

// Later, update the interface with new content using the ID.
snap.request({
  method: 'snap_updateInterface',
  params: {
    id: 'interface-id',
    ui: (
      <Box>
        <Heading>Updated Interface</Heading>
        <Text>This interface has been updated.</Text>
      </Box>
    ),
  },
})

```
