Timestamp
Render a timestamp value with Astryx formatting.
Astryx Props
JSON-safe Timestamp props forwarded to Astryx.
Supported Astryx props include:
value(string or number; required): The date/time to display. Accepts Unix timestamps (seconds) or ISO 8601 strings.format('relative' or 'auto' or 'date' or 'date_time' or 'time' or 'system_date' or 'system_date_time' or 'system_time'): Display format. 'relative' shows '2 hours ago', 'date' shows 'Mar 21, 2025', 'date_time' shows 'Mar 21, 2025, 2:51 PM', 'time' shows '2:51 PM', 'system_*' variants use ISO-style formatting, 'auto' switches from relative to date_time based on recency.autoThreshold(number): Threshold in seconds for 'auto' format to switch from relative to date_time.hasTooltip(boolean): Whether to show a tooltip with the full date/time on hover when displaying relative time.isTimezoneShown(boolean): Whether to append the timezone abbreviation. Applies to date_time, time, system_date_time, and system_time formats.isLive(boolean): Whether the relative time should update live (e.g. "2 min ago" -> "3 min ago").type(TextType): Semantic text type from Text. Determines size, weight, and line-height.size(TextSize): Explicit font size override. Overrides the size from type.color(TextColor): Text color.weight(TextWeight): Font weight override.
See Astryx component docs: https://astryx.atmeta.com/components/Timestamp.
Functions
constructor__init__(value, *, format=None, auto_threshold=None, tooltip=None, timezone=None, live=None, text_type=None, size=None, color=None, weight=None, **props) -> Noneparamvaluestr | int | floatSynchronized component value.
paramformatstr | None= NoneRelative, automatic, date, time, or system display format.
paramauto_thresholdint | float | None= NoneAutomatic-format threshold in seconds.
paramtooltipbool | None= NoneWhether relative timestamps show the full value on hover.
paramtimezonebool | None= NoneWhether to append the timezone abbreviation.
paramlivebool | None= NoneWhether relative text updates over time.
paramtext_typestr | None= NoneSemantic text type.
paramsizestr | None= NoneExplicit text-size override.
paramcolorstr | None= NoneTheme text color.
paramweightstr | None= NoneFont-weight override.
parampropsAny= {}Returns
None