> ## Documentation Index
> Fetch the complete documentation index at: https://rive.app/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Data

The file's view model factories, keyed by view model name.
`Data.MyViewModel.new()` creates a fresh instance of the view model named
`MyViewModel`; pass an instance name to copy an existing instance from the
file. Looking up a name with no matching view model returns nil.

```lua theme={null}
local button = Data.Button.new()
local label = button:getString('label')
if label then
  label.value = 'Play'
end
```

## Static Functions

### `new`

<div class="signature">
  ```lua theme={null}
  new(instanceName: string?) -> ViewModel
  ```
</div>
