All rules

Sheath rule

native-component-slot-content

NativePHP child-component tags cannot contain rendered native slot output.
Package
NativePHP
Category
Native
Default severity
error by default
Auto-fix
Manual fix

#Why

Registered native child components receive attributes but do not accept rendered native slot content. Native descendants inside the tag are rejected instead of rendered.

#Examples

#Bad

{{-- Child components cannot accept rendered native slot content. --}}
<native:user-card>
<native:text>Administrator</native:text>
</native:user-card>

#Good

{{-- The child component receives the value as an attribute. --}}
<native:user-card subtitle="Administrator" />

Native descendants behind Blade conditions and loops are also reported.

#Notes

Registered application components are recognized as child components. Raw HTML that does not produce native output is not treated as native slot content.

#Options

All NativePHP rules accept nativeViewPaths. The default is ['views/native/']. See Native View Detection for path configuration.

#See Also

Related rules check component identity and events: