theme
prop and no set of CSS variables to override. Because the CLI copies the source
into your project, you own the code, so styling means editing it: change its
classes, swap its icons, restructure its markup. Nothing is hidden behind a
package boundary.
This page shows the patterns. The Minimal Player
example below is a full worked walkthrough.
Where the styles live
After you add a component, its source sits in your project (by default under@/registry/react/). Open the file and you’ll find ordinary JSX with a default
inline SVG icon and, where needed, a little Tailwind. For example, the
Play Pause Button renders a bare button with the
default play / pause icon:
PlayPauseButton.tsx
Edit the classes in place
To theme it, add the classes you want and swap the icons for your own. For example, restyle the same component into a round brand-purple button:PlayPauseButton.tsx
bg-[#943bfc]) wherever
you can, such as bg-brand or bg-primary from your Tailwind theme. This keeps
the player in sync with the rest of your app.
Swap the icons
Each component ships a default inline SVG icon (the same art the real BeyondWords player uses). It’s just markup in the file you own, so replace it with your own SVG, an icon library, or text. The button readsplaybackState,
so you decide what each state renders:
fill="currentColor", so by default they take the surrounding
text color. Set a color on the button (or the icon) to change them.
Conditional classes with cn
For state-dependent styling, the cn
helper (installed at @/lib/utils) merges class lists and resolves Tailwind
conflicts. The examples use it to restyle themselves when they detach into a
floating widget:
Dark mode
There’s no dark-mode toggle baked in. Use Tailwind’sdark: variant so the
player follows your app’s existing color scheme:
Primitives vs. examples
- Components (primitives) are minimal and unopinionated on purpose. The Progress Bar, for instance, ships just enough Tailwind to be usable: a translucent track with a solid fill. Override those classes freely.
- Examples are fully styled, pre-assembled players. Read them as worked references, or copy one and restyle it rather than starting from scratch.