Skip to content

Actions

Actions are visually distinct call-to-action links displayed below the video player.

Actions can be defined in the frontmatter of a video or collection video page to link to related content, resources, or actions users can take after watching the video.

The following example demonstrates how to add two actions, one to download the source code related to the video and another to open a documentation page.

---
video:
actions:
- text: Download code
link: https://github.com/HiDeoo/starlight-videos
- text: Documentation
link: https://starlight.astro.build/
---

Actions are defined in the actions field of the video frontmatter when the type is set to video or collection-video and support the following fields:

required
type: string

The text displayed on the action link.

---
video:
actions:
- text: Download code
---

required
type: string

The URL that the action link points to.

---
video:
actions:
- link: https://github.com/HiDeoo/starlight-videos
---

type: 'primary' | 'secondary' | 'minimal'
default: 'primary'

The appearance of the action link. Use primary for a prominent call-to-action link using the theme’s accent color, secondary for a less prominent link, or minimal for a link with minimal styling.

---
video:
actions:
- variant: secondary
---

type: string

The optional icon to display in the action link which must be the name of one of Starlight’s built-in icons.

---
video:
actions:
- icon: external
---

type: 'start' | 'end'
default: 'end'

The placement of the icon in relation to the action link text.

---
video:
actions:
- iconPlacement: start
---