[**Documentation**](../../../../README)

***

[Documentation](../../../../README) / [@zerotal/flow](../../README) / [index](../README) / locked

# Variable: locked

> `const` **locked**: (`value`, `context`) => `void`

Defined in: [flow/src/decorators.ts:459](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/flow/src/decorators.ts#L459)

Marks a field as exposed but read-only client-side: it is included in the snapshot (the client
can read/render it) but the client cannot mutate it via `flow:model`.

## Parameters

### value

`unknown`

### context

`ClassFieldDecoratorContext`

## Returns

`void`

## Remarks

`@locked` implies `@expose` (it registers the prop as exposed) while additionally flagging it
as locked, so client-originated writes are rejected. Use it for server-authoritative state the
UI displays but must not change directly — the value only moves via server actions. Applies to
a field only.

## Example

```tsx
class Profile extends Component {
  // Client renders it, but cannot bind it with flow:model.
  @locked role = "member";
}
```
