Skip to main content
Cachet provides stable HTML data attributes and PHP render hooks for status page themes. The documented attributes remain compatible between releases. Framework classes and HTML nesting may change. The Custom CSS field is in Settings, then Manage Customization. See Customization for CSS variables and the other customization fields.

CSS hooks

data-page identifies a page, data-component identifies a reusable component, and data-slot identifies a part of that component.
Custom CSS
Different components reuse slot names such as title, content, and status. A data-component or data-page selector limits a data-slot selector to the intended component or page.

Pages

The <body> element has one of these data-page values:

Components and slots

Components may be absent when their feature is disabled or they have no content. Repeated records also expose their database key separately through data-component-id, data-component-group-id, data-incident-id, data-metric-id, data-schedule-id, or data-update-id. Use those attributes only when a theme must target one configured record. Incident-day components expose their ISO date through data-date. The subscribe component exposes data-state="form", subscribed, unsubscribed, or verified on its state slot.

Render hooks

Render hooks insert custom HTML without overriding Cachet views. This example registers a hook in an application service provider’s boot method:
app/Providers/AppServiceProvider.php
The callback can return a string, an Htmlable object, or a view. Cachet renders hook output as HTML. Untrusted data needs escaping before the callback returns it.

Available render hooks

Item-level hooks can run more than once on a page. Component, component-group, and schedule hooks insert content next to list items. Visible content at these positions requires a valid <li> element. Render hooks for optional sections run only when Cachet renders that section. For example, metrics hooks are unavailable when metric graphs are disabled. Registering FOOTER creates the footer boundary even when Cachet’s built-in support and timezone content are disabled.

Compatibility

The documented attribute values and render-hook constants are public APIs. Compatibility guarantees do not cover selectors based on:
  • Utility classes or generated framework classes
  • Element depth, child position, or heading level
  • Alpine attributes such as x-data
  • Filament-specific markup
These implementation details may change between releases.