# Button Click & Swipe Up Events

This section shows you how to handle swipe up and action button clicks from users.


Storyly content is designed to redirect users to the application’s content more effectively. For this purpose, we’ve Call to Action flow. You can add Swipe Up or CTA Button to any story using Storyly Studio, and you will have access to any information about the action with this flow. Storyly will notify your application in case of Swipe Up or CTA Button action.

StorylyView(
    ...
    storylyActionClicked: (story) {
        print("storylyActionClicked")
    },
)

storylyActionClicked function has a parameter called story, which is the json representation of a Story object. You can check native documentation for parameters in detail; also, here is the sample format of parameters:

{
  "id": 1,
  "title": "...",
  "index": 1,
  "seen": true,
  "media": {
    "type": 1,
    "url": "...",
    "actionUrl": "..."
  }
}