> ## Documentation Index
> Fetch the complete documentation index at: https://astro-asciinema.hedger.ch/llms.txt
> Use this file to discover all available pages before exploring further.

# Component reference

> Reference for the Astro Asciinema component props and theme-source values.

Import the named `Asciinema` component from the package root:

<CodeGroup>
  ```astro Astro theme={null}
  ---
  import { Asciinema } from "astro-asciinema";
  ---
  ```

  ```mdx MDX theme={null}
  import { Asciinema } from "astro-asciinema"
  ```
</CodeGroup>

## Props

<ParamField body="src" type="string" required>
  URL of an asciicast or another recording format supported by Asciinema player.
  Importing a local recording with `?url` produces a suitable value.
</ParamField>

<ParamField body="options" type="Omit<Options, &#x22;logger&#x22;>">
  Serializable [Asciinema player
  options](https://docs.asciinema.org/manual/player/options/). The component
  passes these options to `AsciinemaPlayer.create` in the browser.
</ParamField>

<ParamField body="theme-source" type="ThemeSource | false" default="media">
  Source to watch for theme changes. When it changes, the component remounts the
  player and preserves its playback time and playing state.

  Accepted values:

  * `"media"`: watch `(prefers-color-scheme: dark)`.
  * `"class"`: watch the `dark` class on `<html>`.
  * `{ class: "name" }`: watch a custom class on `<html>`.
  * `"data-theme"`: watch the `data-theme` attribute on `<html>`.
  * `{ attribute: "name" }`: watch a custom attribute on `<html>`.
  * `false`: disable theme watching.
</ParamField>

<ParamField body="class" type="string">
  Class name applied to the rendered `<astro-asciinema>` custom element.
</ParamField>

## Example

```astro theme={null}
<Asciinema
	src={Demo}
	class="terminal-recording"
	options={{
		controls: true,
		cursorMode: "hidden",
		theme: "site",
	}}
	theme-source="class"
/>
```

For custom light and dark palettes, see [Theme
watching](/guides/theme-watching).
