# Auto Reply Editor

> The out-of-office reply: on or off, an optional period (from, until), subject and message, and whether only contacts get it.

Component · Forms · Pro kit · [Live page](https://ui.twentyfirst.media/pro/components/AutoReplyEditor/)

The out-of-office reply: on or off, an optional period (from, until), subject and message, and whether only contacts get it. The badge says the state ("On until April 24"). Dates come back as `Date`s.

## Example

```tsx
import { AutoReplyEditor } from "@twentyfirstmedia/pro";

export default function Preview() {
  return (
    <AutoReplyEditor
      defaultValue={{
        enabled: true,
        start: new Date(2026, 3, 20),
        end: new Date(2026, 3, 24),
        subject: "Out of office until April 24",
        message:
          "Thanks for your message. I'm away until Friday, April 24, with little access to mail. For anything urgent, write to support@example.com.",
        contactsOnly: false,
      }}
      onSave={() => {}}
    />
  );
}
```

## Props

### AutoReplyEditor

| Prop | Type | Notes |
| --- | --- | --- |
| `value?` | `AutoReplyValue` |  |
| `defaultValue?` | `AutoReplyValue` |  |
| `onChange?` | `(value: AutoReplyValue) => void` |  |
| `onSave?` | `(value: AutoReplyValue) => void` |  |
| `saving?` | `boolean` |  |
| `className?` | `string` | Extra class on the root element. |
| `style?` | `CSSProperties` | Inline style on the root element. |
