> ## Documentation Index
> Fetch the complete documentation index at: https://docs.beyondwords.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Introduction

> Composable, minimal custom elements for the BeyondWords player. Own the code and style it your way.

A set of framework-agnostic [custom elements](https://developer.mozilla.org/docs/Web/Web_Components)
for building your own UI on top of the
[BeyondWords player](https://github.com/beyondwords-io/player). They give you
play/pause, seeking, playback rate and more as small building blocks you compose
in plain HTML and style yourself. The player keeps doing the hard part:
playback, analytics, ads, segments and lock-screen integration.

This is not a packaged widget. The elements are distributed as a
[shadcn registry](https://ui.shadcn.com/docs/registry), so **you own the code**:
the CLI copies the source straight into your project, where you can restyle,
rearrange or rewrite it.

```bash npm theme={null}
npx @beyondwords/cli components add play-pause-button --html
```

```bash pnpm theme={null}
pnpm dlx @beyondwords/cli components add play-pause-button --html
```

```bash yarn theme={null}
yarn dlx @beyondwords/cli components add play-pause-button --html
```

```bash bun theme={null}
bunx --bun @beyondwords/cli components add play-pause-button --html
```

Here's the [Standard Player](https://docs.beyondwords.io/components/html/standard-player.md) example, running
live, built entirely from these elements:

> [!NOTE]
>
> Using React? Everything here is also available as
> [React components](https://docs.beyondwords.io/components/react/introduction.md). Use the React / HTML tabs
> at the top of the Components section.

## How it works

The kit is three layers on top of one engine. Stop at whichever layer
gives you the control you need:

1. **[Player Provider](https://docs.beyondwords.io/components/html/player-provider.md)**:
   `<bw-player-provider>` mounts the player JavaScript SDK (loaded as the
   global `BeyondWords`), holds the instance, and shares it with the elements
   inside. This is the foundation everything else sits on.
2. **Components**: small, minimal custom elements like
   [Play Pause Button](https://docs.beyondwords.io/components/html/play-pause-button.md) and
   [Progress Bar](https://docs.beyondwords.io/components/html/progress-bar.md). You bring the styling.
3. **Examples**: complete, pre-assembled players you drop in and tweak, like
   the [Standard Player](https://docs.beyondwords.io/components/html/standard-player.md).

Every element behaves the same way:

* **It reads state from the player instance** by extending `BwPlayerConsumer`,
  which resolves the nearest provider and exposes the instance as
  `this._player`. Elements stay in sync by listening for player events and
  updating their own markup.
* **It drives the player by emitting events** built with
  [`newEvent`](https://docs.beyondwords.io/components/html/new-event). This is the same path the standard
  player UI uses, so analytics, ads and segment logic stay correct. Simple
  state such as `playbackRate` can also be set directly on the instance.

Every layer is copied into your codebase, so there's no black box and no
version lock-in. The trade-off is that you maintain what you customize.

## Next steps

> [card] [Setup](https://docs.beyondwords.io/components/html/setup.md)
>
> Install the elements and build your first player.

> [card] [Components](https://docs.beyondwords.io/components/html/play-pause-button.md)
>
> Browse the minimal building blocks.

> [card] [Theming](https://docs.beyondwords.io/components/html/theming.md)
>
> Restyle the elements to match your brand.

> [card] [Examples](https://docs.beyondwords.io/components/html/standard-player.md)
>
> Drop in a complete, pre-built player.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.