Skip to main content
Cachet exposes stable HTML data attributes and PHP render hooks for status page themes. Use these public hooks instead of CSS framework utilities, generated classes, or the current HTML nesting. Implementation classes may change between releases; the documented data attributes are the theming contract. Add CSS in Settings → Manage Customization → Custom CSS. See Customization for CSS variables and the other customization fields.

CSS hooks

Use data-page to scope an entire page, data-component to select a reusable component, and data-slot to select a semantic part within that component.
Custom CSS
Scope data-slot selectors through a data-component or data-page. Slot names such as title, content, and status are intentionally reused by different components.

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. Register hooks in the boot method of an application service provider:
app/Providers/AppServiceProvider.php
The callback may return a string, an Htmlable object, or a view. Cachet renders hook output as HTML, so escape any untrusted data before returning it.

Available render hooks

Item-level hooks can run more than once on a page. Component, component-group, and schedule hooks are adjacent to list items; return a valid <li> when inserting visible content there. 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

Treat the documented attribute values and render-hook constants as public APIs. Avoid 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 without a theming compatibility guarantee.