Skip to content

zk-styles ​

The CSS that some components need, printed once in the layout, with a CSP nonce.

Props ​

PropTypeDefaultDescription
noncestring|nullnullNonce of your content security policy; by default the one of Vite::cspNonce() when there is one
featuresarray|string[]Styles to print even if no component asked for them (carousel, code-group, all)
classstring|nullnullCSS class(es) merged onto the root element

Undeclared attributes forward to the root element.

Like zk-scripts: it prints only the styles of the components rendered before it, in one <style> tag, and nothing when none is needed. It exists so that no component needs an inline style attribute. Put it after the content, or name the styles with features to print them in the <head>; or publish the CSS (php artisan vendor:publish --tag=zairakai-assets) and import it in your own style sheet.

Examples ​

In the layout ​

blade
<x-zk-styles />

Documentation of 3.2.0 , built from c93e21f on 3.2.0 by pipeline #2919741884 on 2026-10-06.