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

***

[Documentation](../../../../README) / [@zerotal/admin](../../README) / [index](../README) / Entry

# Class: Entry

Defined in: [admin/src/infolist/Entry.ts:62](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/admin/src/infolist/Entry.ts#L62)

## Constructors

### Constructor

> **new Entry**(`key`): `Entry`

Defined in: [admin/src/infolist/Entry.ts:91](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/admin/src/infolist/Entry.ts#L91)

#### Parameters

##### key

`string`

#### Returns

`Entry`

## Methods

### make()

> `static` **make**(`key`): `Entry`

Defined in: [admin/src/infolist/Entry.ts:95](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/admin/src/infolist/Entry.ts#L95)

#### Parameters

##### key

`string`

#### Returns

`Entry`

***

### label()

> **label**(`label`): `this`

Defined in: [admin/src/infolist/Entry.ts:102](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/admin/src/infolist/Entry.ts#L102)

Human label for the entry. Defaults to a title-cased key.

#### Parameters

##### label

`string`

#### Returns

`this`

***

### state()

> **state**(`fn`): `this`

Defined in: [admin/src/infolist/Entry.ts:108](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/admin/src/infolist/Entry.ts#L108)

Derive the value from the whole record instead of `record[key]`.

#### Parameters

##### fn

(`row`) => `unknown`

#### Returns

`this`

***

### default()

> **default**(`value`): `this`

Defined in: [admin/src/infolist/Entry.ts:114](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/admin/src/infolist/Entry.ts#L114)

Value used when the record's value is null/undefined.

#### Parameters

##### value

`unknown`

#### Returns

`this`

***

### placeholder()

> **placeholder**(`text`): `this`

Defined in: [admin/src/infolist/Entry.ts:120](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/admin/src/infolist/Entry.ts#L120)

Text shown when the resolved value is empty.

#### Parameters

##### text

`string`

#### Returns

`this`

***

### format()

> **format**(`fn`): `this`

Defined in: [admin/src/infolist/Entry.ts:126](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/admin/src/infolist/Entry.ts#L126)

Custom value formatter (runs last in the pipeline).

#### Parameters

##### fn

`Resolver`\<`string`\>

#### Returns

`this`

***

### badge()

> **badge**(`value?`): `this`

Defined in: [admin/src/infolist/Entry.ts:134](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/admin/src/infolist/Entry.ts#L134)

Render the value inside a colored pill.

#### Parameters

##### value?

`boolean` = `true`

#### Returns

`this`

***

### color()

> **color**(`tone`): `this`

Defined in: [admin/src/infolist/Entry.ts:140](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/admin/src/infolist/Entry.ts#L140)

Badge/text tone — a fixed tone or a function of the value.

#### Parameters

##### tone

[`BadgeTone`](../type-aliases/BadgeTone) \| `Resolver`\<BadgeTone \| null\>

#### Returns

`this`

***

### icon()

> **icon**(`name`): `this`

Defined in: [admin/src/infolist/Entry.ts:146](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/admin/src/infolist/Entry.ts#L146)

Leading icon (key from `ui/icons`), fixed or computed.

#### Parameters

##### name

`string` \| `Resolver`\<`string` \| `null`\>

#### Returns

`this`

***

### boolean()

> **boolean**(`value?`): `this`

Defined in: [admin/src/infolist/Entry.ts:152](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/admin/src/infolist/Entry.ts#L152)

Render as a boolean check/cross icon (IconEntry).

#### Parameters

##### value?

`boolean` = `true`

#### Returns

`this`

***

### copyable()

> **copyable**(`value?`): `this`

Defined in: [admin/src/infolist/Entry.ts:159](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/admin/src/infolist/Entry.ts#L159)

Add a click-to-copy button next to the value.

#### Parameters

##### value?

`boolean` = `true`

#### Returns

`this`

***

### url()

> **url**(`fn`): `this`

Defined in: [admin/src/infolist/Entry.ts:165](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/admin/src/infolist/Entry.ts#L165)

Turn the value into a link.

#### Parameters

##### fn

`Resolver`\<`string` \| `null`\>

#### Returns

`this`

***

### html()

> **html**(`value?`): `this`

Defined in: [admin/src/infolist/Entry.ts:171](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/admin/src/infolist/Entry.ts#L171)

Treat the formatted value as trusted HTML (rendered as-is).

#### Parameters

##### value?

`boolean` = `true`

#### Returns

`this`

***

### weight()

> **weight**(`weight`): `this`

Defined in: [admin/src/infolist/Entry.ts:177](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/admin/src/infolist/Entry.ts#L177)

Font weight.

#### Parameters

##### weight

[`EntryWeight`](../type-aliases/EntryWeight)

#### Returns

`this`

***

### size()

> **size**(`size`): `this`

Defined in: [admin/src/infolist/Entry.ts:183](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/admin/src/infolist/Entry.ts#L183)

Text size.

#### Parameters

##### size

[`EntrySize`](../type-aliases/EntrySize)

#### Returns

`this`

***

### tooltip()

> **tooltip**(`text`): `this`

Defined in: [admin/src/infolist/Entry.ts:189](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/admin/src/infolist/Entry.ts#L189)

Hover tooltip.

#### Parameters

##### text

`string`

#### Returns

`this`

***

### columnSpan()

> **columnSpan**(`span`): `this`

Defined in: [admin/src/infolist/Entry.ts:195](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/admin/src/infolist/Entry.ts#L195)

How many grid columns this entry spans within its section.

#### Parameters

##### span

`number`

#### Returns

`this`

***

### limit()

> **limit**(`n`): `this`

Defined in: [admin/src/infolist/Entry.ts:201](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/admin/src/infolist/Entry.ts#L201)

Truncate the formatted value to `n` characters (adds an ellipsis).

#### Parameters

##### n

`number`

#### Returns

`this`

***

### date()

> **date**(): `this`

Defined in: [admin/src/infolist/Entry.ts:209](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/admin/src/infolist/Entry.ts#L209)

Format the value as a localized date.

#### Returns

`this`

***

### dateTime()

> **dateTime**(): `this`

Defined in: [admin/src/infolist/Entry.ts:215](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/admin/src/infolist/Entry.ts#L215)

Format the value as a localized date + time.

#### Returns

`this`

***

### since()

> **since**(): `this`

Defined in: [admin/src/infolist/Entry.ts:221](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/admin/src/infolist/Entry.ts#L221)

Format the value as a relative time ("3 days ago").

#### Returns

`this`

***

### money()

> **money**(`currency?`): `this`

Defined in: [admin/src/infolist/Entry.ts:227](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/admin/src/infolist/Entry.ts#L227)

Format the value as currency.

#### Parameters

##### currency?

`string` = `"USD"`

#### Returns

`this`

***

### getLabel()

> **getLabel**(): `string`

Defined in: [admin/src/infolist/Entry.ts:234](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/admin/src/infolist/Entry.ts#L234)

#### Returns

`string`

***

### circular()

> **circular**(`value?`): `this`

Defined in: [admin/src/infolist/Entry.ts:245](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/admin/src/infolist/Entry.ts#L245)

Render an image entry as a circle — avatars and logos.

#### Parameters

##### value?

`boolean` = `true`

#### Returns

`this`

***

### height()

> **height**(`px`): `this`

Defined in: [admin/src/infolist/Entry.ts:251](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/admin/src/infolist/Entry.ts#L251)

Pixel height for an image entry (width follows the aspect ratio).

#### Parameters

##### px

`number`

#### Returns

`this`

***

### language()

> **language**(`name`): `this`

Defined in: [admin/src/infolist/Entry.ts:257](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/admin/src/infolist/Entry.ts#L257)

Syntax label shown beside a code entry — `"json"`, `"sql"`, `"ts"`.

#### Parameters

##### name

`string`

#### Returns

`this`

***

### render()

> **render**(`fn`): `this`

Defined in: [admin/src/infolist/Entry.ts:272](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/admin/src/infolist/Entry.ts#L272)

Render this entry yourself, when no built-in kind fits — a map, a chart, a
rendered diff.

  textEntry("route").render((v) => <RouteMap path={String(v)} />)

The renderer replaces the value entirely; the label and column span still
come from the entry, because those belong to the section's grid rather than
to the value.

#### Parameters

##### fn

(`value`, `row`) => `string` \| [`HtmlNode`](../../../flow/index/type-aliases/HtmlNode)

#### Returns

`this`

***

### schema()

> **schema**(`entries`): `this`

Defined in: [admin/src/infolist/Entry.ts:278](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/admin/src/infolist/Entry.ts#L278)

Nested entries rendered once per item of an array-valued attribute.

#### Parameters

##### entries

`Entry`[]

#### Returns

`this`

***

### display()

> **display**(`row`): [`EntryDisplay`](../interfaces/EntryDisplay)

Defined in: [admin/src/infolist/Entry.ts:283](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/admin/src/infolist/Entry.ts#L283)

#### Parameters

##### row

`Record`\<`string`, `unknown`\>

#### Returns

[`EntryDisplay`](../interfaces/EntryDisplay)
