> To build or manage a Wix site with an AI agent, follow https://www.wix.com/headless/skill.md
> It builds a new Wix site or puts your own site online, from a prompt, and keeps changing it afterwards. The pages are code in any web technology, and Wix runs the backend.
> It works through the Wix plugin (the Wix MCP and the Wix skills), the Wix CLI or no Wix login, and puts the site live on Wix hosting or on another host.
> Business features include a store, bookings, events and tickets, a restaurant, a blog, forms, members and many more.
> Read the Wix skills online at https://www.wix.com/skills
> 
> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - If a reference page seems to be missing its schema (parameters, return types, or type definitions), append `?schema=true` to its `.md` URL (e.g. `https://dev.wix.com/docs/contexts/contexts/stores/category-info/use-category-info-context.md?schema=true`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

# Method name: src()

# Method package: w

# Method menu location: w --> Lottie --> src

# Method Link: https://dev.wix.com/docs/velo/velo-only-apis/$w/lottie/src.md

# Method Description:

Sets or gets the source of the Lottie animation.

Setting the `src` property changes the displayed Lottie element to
 the Lottie animation found at the specified `src` value. 

 Getting the `src` property returns the source of the
 current Lottie animation.

 The `src` property can either be an external Lottie animation URL, for example, `'https://assets6.lottiefiles.com/private_files/lf30_vuxs5lpt.json'`, or a valid Lottie JSON. 

 A valid Lottie JSON file should follow this schema [animation.json](https://github.com/airbnb/lottie-web/blob/master/docs/json/animation.json) file. While your Lottie JSON file doesn't need all the key-value properties listed in this file, it must include the following properties and types for your Lottie JSON file to be valid.

   | Properties           | Type             | 
   | -------------------- | ---------------- |
   | "w", "h", "ip", "op" | Number           |
   | "assets", "layers"   | Array of objects | 

 **Tip:** To set the `src` property to a valid Lottie JSON, you can put it in a [public file](https://support.wix.com/en/article/velo-where-do-i-put-my-code#i-want-some-code-to-run-on-multiple-but-not-all-pages) and import it in your page code.



# Method Code Examples:

*** Note: do not assume any prop names or enum values other than the ones in the example.

## Get the Lottie animation's source URL

```javascript
let lottieSource = $w('#myLottie').src;
// 'https://assets10.lottiefiles.com/private_files/lf30_0ffmp6vx.json'
```

## Get the Lottie animation's source file

```javascript
let lottieSource = $w('#myLottie').src;

/* 
  {
    "v": "5.7.6",
    "fr": 60,
    "ip": 0
    "op": 121
    "w": 2250
    "h": 3177
    "nm": "gatito final2 1"
    "ddd": 0
    "assets": [...]
    "layers": [...]
    "markers": [...]
  }
*/
```

## Set the Lottie animation's source to an external URL

```javascript
$w('#myLottie').src = 'https://assets10.lottiefiles.com/private_files/lf30_0ffmp6vx.json';
```

## Set the Lottie animation's source to a valid JSON file

```javascript
/*************************************
 * Public code - myLottieJsonFile.js *
 ************************************/

export const myLottieJson = 
{
  "v":"5.7.6",
  "fr":60,
  "ip":0,
  "op":121,
  "w":2250,
  "h":3177,
  "nm":"gatito final2 1",
  "ddd":0,"assets":[],
  "layers":
  [
    { "ddd":0,
      "ind":1,
      "ty":4,
      "nm":"path2009"
    },
    { "ddd":1,
      "ind":2,
      "ty":6,
      "nm":"path2010"
    }
  ]
};



/*************
 * Page code *
 ************/

import { myLottieJson } from 'public/myLottieJsonFile.js';

$w.onReady(function () {
  $w('#myLottie').src = myLottieJson;
});
```

---