# useTimeout

*Category:* Utilities
*Section:* Lifecycle & execution hooks
*Source:* https://uikit.developers.rio.cloud/#/utilities/useTimeout
*Captured:* 2026-04-27T14:59:31.893Z

The useTimeout hook allows for executing some code after a specified amount of time.

## useTimeout

### Example: Example 1

Message: ...

#### React (tsx)

```tsx
import { useState } from 'react';

import useTimeout from '@rio-cloud/rio-uikit/useTimeout';

export default () => {
    const [message, setMessage] = useState('...');

    useTimeout(() => setMessage('Callback invoked'), 2000);

    return (
        <div className='display-flex flex-column justify-content-center align-items-center height-50'>
            <label>Message:</label>
            <div>{message}</div>
        </div>
    );
};
```

#### HTML (html)

```html
<div class="display-flex flex-column justify-content-center align-items-center height-50">
    <label>Message:</label>
    <div>...</div>
</div>
```

#### Props

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| callback | Function | — | The callback function to be triggered. |
| delay | Number | — | The time to wait until the callback function gets invoked. |