CSS hooks
Usedata-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
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 theboot method of an application
service provider:
app/Providers/AppServiceProvider.php
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