# Now Playing

> What is playing (Spotify, a speaker, a podcast app): cover, title and artist, the device, progress with times and previous / play-pause / next.

Component · Connectors · Halo kit · [Live page](https://ui.twentyfirst.media/halo/components/NowPlaying/)

What is playing (Spotify, a speaker, a podcast app): cover, title and artist, the device, progress
with times and previous / play-pause / next.

## Example

```tsx
import { NowPlaying } from "@twentyfirstmedia/halo";
import "./_connectors";

export default function Preview() {
  return (
    <div style={{ maxWidth: 480 }}>
      <NowPlaying
        title="Weightless"
        artist="Marconi Union"
        album="Ambient Transmissions"
        position={203}
        duration={488}
        playing
        device="Living room speaker"
        onPlayPause={() => {}}
        onNext={() => {}}
        onPrevious={() => {}}
        service={{ name: "Spotify", icon: "brandSpotify" }}
      />
    </div>
  );
}
```

## Props

### NowPlaying

| Prop | Type | Notes |
| --- | --- | --- |
| `title` | `string` | Required |
| `artist?` | `string` |  |
| `album?` | `string` |  |
| `art?` | `ReactNode` | Cover art: an `<img>`. |
| `position?` | `number` | Position and length in seconds. |
| `duration?` | `number` |  |
| `playing?` | `boolean` |  |
| `device?` | `string` | Where it plays: "Living room speaker". |
| `onPlayPause?` | `() => void` |  |
| `onNext?` | `() => void` |  |
| `onPrevious?` | `() => void` |  |
| `service?` | `ServiceRef` |  |
| `className?` | `string` | Extra class on the root element. |
| `style?` | `CSSProperties` | Inline style on the root element. |
