SKILL.md
Webflow Module Creation
Standard for creating modules in the Webflow development setup.
Workflow
- Create a file in
src/modules/(e.g.,my-feature.ts). - Export a default function:
```typescript import { onMount, onDestroy } from "@/modules/_";
export default function(element: HTMLElement, dataset: DOMStringMap) { onMount(() => { / init / }); onDestroy(() => { / cleanup / }); } ```
- Add
data-module="my-feature"to the element in Webflow.