Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Split Log Viewer Hero Block for React

A showcase hero with the headline and a Shine Button above a wide log window whose lines stream in like a live tail, in a hairline frame between solid rails.

Framework
UI library

Preview

Preview width

Installation

Part of Pro
Pro unlocks the code and one-line install of every Pro button and text effect, plus the MCP for your AI editor.
Have Pro already? Sign in to open it.Opens here as soon as you're Pro.

Overview

A showcase hero for a log search service, built on drafting lines. The top rule and the two side rails run the full height, and the header is split in two by a divider with a + mark where it meets the top rule: the announcement link and the headline at the start, a supporting sentence and the calls to action at the end. A band below, ruled at its top with + marks on the rails, holds a wide log window in a hairline frame with + marks on its corners. The hero follows your theme and only the window is dark, like a terminal: a header with a pulsing Live status, a search filter and the time zone, then twelve log lines that keep arriving at the bottom, the older ones gliding up and out, like tail -f. Each line has its time, a level tag, INFO, DEBUG, WARN or ERROR, in your theme's info, muted, warning and destructive colours, the service and the message. The main action is a Shine Button, with a second, outline button beside it. The stream is our Log Stream Text and the status our Status Pulse Text. For observability platforms, logging services, error tracking tools and developer infrastructure products.

FAQ

How do I change the log lines?

Edit LOGS at the top of the file: one string per line, in the order they arrive. A line starts with its level in brackets ([INFO], [DEBUG], [WARN], [ERROR]), which picks its colour, then the service and the message; two spaces after the service keep it apart from the message. The times aren't in the strings: start on LogStreamText is the first line's time, and each line after it is interval milliseconds later. Give the stream more lines than the window shows (rows, twelve here) so the loop doesn't repeat too soon.

Can it show my real logs?

It can show any lines you give it, but it's built to tell a story on a marketing page, not to tail a production system: it plays its lines on a timer and starts over after the last. For real logs, render your stream in your product with its own list, filters and pause control. On this page, curated lines that show your best features (structured fields, clear errors, fast queries) sell better than a raw feed.

Can visitors stop the stream to read it?

Yes. The stream pauses while the pointer is over it, and it's a focusable log region, so a keyboard user can tab to it and it holds still while it has focus, then picks up again when focus leaves. With reduced motion on, new lines still arrive, but they appear in place instead of gliding.

How does a screen reader read the log?

The stream is a log region named Sample log stream. Its lines can be read like any text, but new ones aren't announced as they arrive, so a screen reader isn't interrupted every second and a half. The window's header, the Live status, the filter and the time zone, is decoration: hidden from screen readers and inert. The headline is the block's one h1, and the announcement pill and both calls to action are links named by their text.

Why is the window dark when the page is light?

The rest of the hero follows your theme, including the frame and its + marks. Log viewers and terminals read as dark windows, so the window alone is a dark scope with its own surface: it takes your theme's dark colours in light and dark mode alike. Its error red is mixed a little toward the foreground on that scope (--log-error), because a dark theme's destructive red is too dim for small text on near-black. Remove the dark class to have the window follow the page instead.

How does the hero fit on a phone?

The two halves of the header stack below the lg breakpoint, the headline first, then the sentence and the buttons, with the log window under them, so the Shine Button is on the first screen. The window's lines never wrap: each message shortens with an ellipsis, so the time and the level stay lined up at the start of every row. The log stays left to right in right-to-left layouts, as code and logs do. The headline steps down from text-6xl to text-4xl.

  • Pro

    A split hero for an API: the headline, a Shine Button and three ticks beside a dark terminal with a request, a status and a JSON response that writes itself out, above a band of three figures.

  • Pro

    A compact reverse split hero for an SDK: a dark code window with a deploy call and its JSON response beside the headline, a copyable install command and a Shine Button, over a closing band of three ruled feature cells.

  • Pro

    A split hero for a feature-flag service: the headline, a Shine Button and three ticks beside a narrow flags dashboard in a hairline frame, with environment tabs, rollout meters and a working switch on every flag.

  • Pro

    Split API Playground Hero

    Code and terminal

    A showcase hero for a payments API: a headline, a Shine Button, a second action and three ticks, then a wide playground under its own rule: a POST request beside the 200 response, each JSON body writing itself out.

  • Pro

    Code Window Hero

    Code and terminal

    A split hero for an API client generator on solid rails: a headline and a Shine Button beside a code window whose snippet comes in token by token, in a hairline frame with + marks.

  • Pro

    A showcase centered hero for an API platform, with a live status pill, a Shine Button and a status panel of full-width bands: five services' uptime over the last 30 days.