> ## Documentation Index
> Fetch the complete documentation index at: https://doc.lucidworks.com/llms.txt
> Use this file to discover all available pages before exploring further.

# lifecycle:display

export const LwTemplate = ({title = "Key questions to get you started", icon = "sparkles", cta = "Powered by Agent Studio", linkHref = "https://lucidworks.com/demo/?utm_source=docs&utm_medium=referral&utm_campaign=docs_cta_ai"}) => {
  const [isLoaded, setIsLoaded] = useState(false);
  useEffect(() => {
    const timer = setTimeout(() => {
      setIsLoaded(true);
    }, 500);
    return () => clearTimeout(timer);
  }, []);
  return <div className="lw-template-container">
      <Card title={title} icon={icon}>
        {isLoaded && <span dangerouslySetInnerHTML={{
    __html: `<lw-template id="a029c1a9-28be-427e-b0e1-5d918920246a"></lw-template
            >`
  }} />}
        <Link href={linkHref} className="agent-studio-link text-left text-gray-600 gap-2 dark:text-gray-400 text-sm font-medium flex flex-row items-center hover:text-primary dark:hover:text-primary-light group-hover:text-primary group-hover:dark:text-primary-light">Powered by Lucidworks Agent Studio</Link>
      </Card>
    </div>;
};

[localhost link]: http://localhost:3000/docs/4/app-studio/reference/tags/lightning.directive.lifecycleDisplay

[mintlify link]: https://doc.lucidworks.com/docs/4/app-studio/reference/tags/lightning.directive.lifecycleDisplay

[old doc.lw link]: https://doc.lucidworks.com/app-studio/4.2/1197

<LwTemplate />

## Description

Display an element for a period of time

## Usage

as element:

```xml wrap  theme={"dark"}
<lifecycle:display
       time="{string}">
</lifecycle:display>
```

#### Parameters

| Param | Type       | Details                                |
| ----- | ---------- | -------------------------------------- |
| time  | **string** | The time in ms to display the elements |

## Example

#### Source

```xml wrap  theme={"dark"}
<p>A message will disappear after 5 seconds.</p>
<lifecycle:display time="5000">
    <search:alert style="alertbox-negative">Alert - I disappear after 5 seconds.</search:alert>
</lifecycle:display>
<p>A message will disappear after 10 seconds has passed.</p>
<lifecycle:display time="10000">
    <search:alert style="alertbox-warning">Alert - I disappear after 10 seconds.</search:alert>
</lifecycle:display>
<p>A message will disappear after 20 seconds has passed.</p>
<lifecycle:display time="20000">
    <search:alert style="alertbox-positive">Alert - I disappear after 20 seconds.</search:alert>
</lifecycle:display>
```

#### Result

<img src="https://mintcdn.com/lucidworks/ENcE8K39c0iEpL8J/assets/images/app-studio/as-examples/tags/lifecycleDisplay.png?fit=max&auto=format&n=ENcE8K39c0iEpL8J&q=85&s=e77ffb89280ebc719dde7dd7b9a8a4f3" alt="Result" width="1024" height="390" data-path="assets/images/app-studio/as-examples/tags/lifecycleDisplay.png" />
