Sheath rule
native-unknown-element
for close typo suggestions on self-closing native: tags
#Why
An unknown native: element fails when NativePHP builds the screen. An
incomplete tag, unmatched closing tag, or unclosed element can also break native
nesting and prevent the screen from compiling.
#Examples
#Bad
{{-- txet is not registered; text is the intended tag. --}}
<native:txet>Account</native:txet>
{{-- This opening tag is incomplete. --}}
<native:column
#Good
{{-- text is a registered native element. --}}
<native:text>Account</native:text>
#Recognized Elements And Syntax
Recognized names include NativePHP built-ins and child components registered by the application. A bundled element catalog is used when the running application's catalog is unavailable.
Whitespace around a native: prefix is accepted when the installed NativePHP
version supports it. Detected native views also allow registered short tag
forms.
#Options
The nativeViewPaths option controls which paths allow short native tags. Its
default is ['views/native/']. See Native View Detection
for configuration and detection behavior.
#Notes
Blade comments, @verbatim, and @php blocks are excluded because they do not
produce native markup. Native tag text inside HTML comments, scripts, and styles
is still checked because NativePHP processes it during compilation.
Closing tags must match NativePHP's nesting order.
#See Also
Related rules distinguish discarded wrappers and rejected component slots:
- native-discarded-markup: Report bare markup omitted from native output
- native-component-slot-content: Report output inside child-component tags
- NativePHP Plugin: Install and configure the NativePHP preset