# render/text-from-record

## Use when
A render JS model should display one text value from the current record.

## Do not use when
The surface should compute and return a value without rendering.
The code is a standalone popup block that needs the popup opener record; use `scene/block/popup-record-summary`.

## Surfaces
- `js-model.render`

## Required ctx roots
- `ctx.libs`
- `ctx.getVar`
- `ctx.render`

## Contract
- Effect style: `render`
- Top-level `return`: optional
- `ctx.render(...)`: required
- Side-effect surface: no

## Normalized snippet

```js
const { Typography } = ctx.libs.antd;
const currentRecord = await ctx.getVar('ctx.record');
const text = String(currentRecord?.title ?? currentRecord?.name ?? '-');

ctx.render(<Typography.Text>{text}</Typography.Text>);
```

## Editable slots
- Replace `title` and `name` with the record fields to display.

## Skill-mode notes
This follows the strict render-model contract: render output must go through Ant Design JSX in `ctx.render(...)`. Use only after `recordSemantic` proves `ctx.record` is the host record.
