Features
Features
Features & Components
ℹ️
Optional activity data
Discord can omit activity details or artwork. Always provide a clear fallback instead of assuming the user is offline.
[Overview](./)
PresenceKit provides data helpers and optional UI building blocks for Discord presence, games, rich activities, and Spotify listening information. Use the framework-neutral helpers when designing your own interface, or start with the React UI components.
Explore the features
| Feature | Guide | What you will learn |
|---|---|---|
| Spotify and Discord activities | Spotify & Activities | Read listening data, games and activity metadata |
| Game and activity images | Activity Artwork | Handle icons, cover art, overrides and fallbacks |
| Ready-made cards | React Widgets & Theming | Display presence and customize the widget theme |
Choosing the right approach
- Custom design: Use
@iconical/presenceand your own application components. - React component library: Use
@iconical/presence/react-uito render the supported ready-made widgets. - Live applications: Prefer framework adapters or the client's subscription helpers instead of repeatedly creating new connections.
IMPORTANT
Spotify and activity details are not always available. Display meaningful fallbacks, and never treat a missing activity as evidence that a user is offline.
Example: handle optional activity data
example.tstypescript
import { createPresenceClient, getPlayingActivities } from "@iconical/presence";
const result = await createPresenceClient().getPresence("123456789012345678");
const games = getPlayingActivities(result.presence);
console.log("Games:", games.map((game) => game.name));
console.log("Spotify:", result.spotify?.song ?? "Not currently shared");For response types, transport options and errors, consult the API Reference. For privacy considerations, read Help & Security.
In this section
Was this page helpful?