idyll-langidyll
DocsTutorialsGalleryEditor
menu

Overview

  • Introduction
  • Getting started
  • Markup syntax
  • HTML tags
  • Options and styles
  • Plugin system
  • Multipage template

Interactivity

  • Built-in components
  • Using components from npm
  • Make your own component
  • Scrolling and Refs

Publishing

  • Deploying to the web
  • Embedding Idyll

Useful Links

  • Github
  • Chat
  • Twitter
  • Support Us
← Back

Action

The action component allows you to add event handlers to text. For example:

Input:

This is regular text, but when you
 [action onClick:`alert('clicked the text')`]click me[/action],
an alert will appear.

Output:

Props

  • onClick event

    An event that is triggered when a reader clicks.

    • Example: `alert("You clicked the text.")`
  • onMouseEnter event

    An event that is triggered when a reader mouses over the element, e.g. x = true.

    • onMouseLeave event

      An event that is triggered when a reader removes their mouse from the element, e.g. x = false.