---
url: "https://vueda.dev/v3/reference/api/vue/DurationDisplay.md"
title: "DurationDisplay"
---

# DurationDisplay

## Overview

Presents a duration in named units rather than its stored literal, so a read view says
"730 days" instead of `730 00:00:00`. A null or absent value renders the same dash
{@link DateTimeDisplay} uses for an empty date.

Both serialized shapes are accepted: the Django duration string DRF's `DurationField`
sends (`[-]D HH:MM:SS[.ffffff]`) and the number of seconds VUEDA's
`DurationSecondsField` sends. Units that hold zero are left out, so a value only names
the parts it has. A duration of zero names the smallest unit ("0 seconds"), which is a
recorded value and not the same as no value at all. Sub-second precision is dropped.

Theme entry: [DurationDisplay](/v3/reference/theming/keys/DurationDisplay.md)

## Props

| Name | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| <span id="prop-themeOverride">themeOverride</span> | `Object` |  | `null` | A partial ThemeObject keyed by component name, merged over this component's theme and provided to descendants. |
| <span id="prop-value">value</span> | `string\|number` |  | `undefined` | The value to present, as a Django duration string or a number of seconds. `null`, `undefined`, and `""` render the dash. |
| <span id="prop-format">format</span> | `string` |  | `"long"` | `"long"` names each unit in full ("2 hours, 30 minutes"); `"short"` abbreviates it ("2h 30m"). |
| <span id="prop-inline">inline</span> | `boolean` |  | `false` | Renders without a wrapping element, for use inside an existing text row. |
| <span id="prop-class">class</span> | `import('vue').HTMLAttributes['class']` |  | `undefined` | Additional CSS classes applied to the root. |

## Source

`client/lib/display/duration-display/DurationDisplay.vue`
