Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Smashing's avatar

BooleanGroup styling

Hi,

Is there a way to change the default style of a BooleanGroup inside the details page?

0 likes
5 replies
bobbybouwmann's avatar

I don't think you can override the HTML without overriding the underlying Vue component. It's pretty hard to do this right because it will be overridden on the next release.

If you only want to change the styling you can create your own theme or load an extra CSS file that overrides the styling of that component.

Theme: https://nova.laravel.com/docs/3.0/customization/themes.html#theme-css

For a custom CSS file, you can do this

// app/Providers/NovaServiceProvider

public function boot(): void
{
    parent::boot();

    Nova::style('admin', public_path('css/admin.css'));
}

Then you can simply create your own admin.css file that is generated by Laravel Mix or you can use plain CSS

bobbybouwmann's avatar

@smashing Did everything work out? If so can you mark it as best reply so others can find it more easily ;) I've seen more questions about this on the forum.

david's avatar

You can override the BooleanGroup component by making a copy of the file, creating a Nova tool, then registering your component in place of it: Vue.component('detail-boolean-group-field', require('path/to/your/custom/Detail/BooleanGroupField.vue'))

Please or to participate in this conversation.