---
title: "init(from:)"
framework: tabletopkit
role: symbol
role_heading: Initializer
path: "tabletopkit/customaction/init(from:)"
---

# init(from:)

Creates an instance of CustomAction initialized from the provided TabletopAction. If the provided action is not a custom action, this initializer returns nil.

## Declaration

```swift
init?(from action: some TabletopAction)
```

## Parameters

- `action`: The action to initialize this instance from.
