# widgets

Native home-screen and lock-screen widgets: responsibilities, supported exports and extension points.

## Purpose [#purpose]

The shared model derives readiness, days covered and this week's steps from the household's kit, never including medication or document names. Platform adapters synchronize iOS snapshots and Android widgets. Native widget configuration follows `varuWidget` in `apps/mobile/widget.config.json`.

## Public exports [#public-exports]

| Subpath | Target |
| --- | --- |
| `.` | `./src/index.ts` |
| `./model` | `./src/model.ts` |
| `./sync` | `./src/sync.ts` |
| `./ios` | `./src/widget-ios.tsx` |
| `./android` | `./src/widget-android.tsx` |

These paths come from `packages/widgets/package.json`. A `.` entry is the package root. Conditional targets distinguish platform or type resolution; consumers should import the subpath, not its source file.

## How to extend [#how-to-extend]

Enable the platform integration deliberately, rebuild the native client and synchronize only the current authorized scope. Clear private widget state on identity changes. Keep platform-only imports behind their explicit entry.

Read the [optional native widgets guide](/docs/features/mobile) for the full flow.

## Key files [#key-files]

- [`packages/widgets/package.json`](https://github.com/CarlosZiegler/varu/blob/main/packages/widgets/package.json)

