suiss/ui ยท Block
Log Live
A live admin activity feed that streams new events, with session stats and a pause control.
Log Live is an open-source block from suiss/ui for React, React Native, SwiftUI and Jetpack Compose. The @esuiss/ui CLI copies its source into your project, so you own the code.
A live activity feed that streams new events to the top of a list, with session stats above and a Pause or Resume button. People appear with gradient avatars and system events with icons, with warnings tinted orange. It sits in a Sidebar with admin navigation that opens as a sheet from the trigger on mobile. Use it for real-time monitoring, deploy logs or live order feeds.
The demo pushes the next item from the feed sample every 2.2 seconds; replace that interval with a subscription to your event stream, such as a WebSocket or server-sent events. Each event has an actor, action, detail, either an avatar hue or an icon, and an optional warning flag. The list keeps only the seven newest events, and the Active users and Avg. response stats are hard-coded.
Every new event is announced to screen readers, which can get noisy on a busy stream; consider throttling or announcing a summary instead.
Installation
Works in any project with a components.json. See Installation for the one-line registry setup. Or use the suiss/ui CLI:
Usage
Web preview
An admin screen with a collapsing Header, three stats for the session, and a list of recent events with an Avatar or icon for each actor. A timer adds the next sample event every 2.2 seconds and keeps the seven newest, with a pulsing Live dot while it runs. The header button pauses and resumes the feed. A TabBar at the bottom switches between admin sections; only Activity has content in the sample.
Replace FEED with your events and swap the timer for your real-time source. Wire onRunningChange and onNavigate to your app.
Installation
- Install the following dependencies:
-
Add the pieces it builds on: Avatar, Button, Header, Icon, Screen, Tab Bar, Text.
-
Copy the animated view into
components/ui/animated-view.tsx:
- Copy and paste the following code into
components/blocks/log-live.tsx:
- Update the import paths to match your project setup.
- Install the following dependencies:
-
Add the pieces it builds on: Avatar, Button, Header, Icon, Screen, Tab Bar, Text.
-
Copy the animated view into
components/ui/animated-view.tsx:
- Copy and paste the following code into
components/blocks/log-live.tsx:
- Update the import paths to match your project setup.
- Install the following dependencies:
-
Add the pieces it builds on: Avatar, Button, Header, Icon, Screen, Tab Bar, Text.
-
Copy the animated view into
components/ui/animated-view.tsx:
- Copy and paste the following code into
components/blocks/log-live.tsx:
- Update the import paths to match your project setup.
-
Target iOS 17 or later.
-
Add the Swift package to your app:
- Copy the theme files every view uses:
- Copy the source and every file it uses:
- Add the files to your app target.
- Apply the Compose compiler plugin, enable Compose, set
compileSdkto 37 or higher andminSdkto 24 or higher, and add the dependencies:
- Copy the theme files every view uses:
- Copy the source and every file it uses:
- Update the
com.esuiss.uipackage names to match your project.