boxlang-core-dev-component-developmentlisted
Install: claude install-skill ortus-boxlang/skills
# BoxLang Component Development
## Overview
BoxLang **components** (also called "custom tags") are reusable markup-oriented
units invoked with tag-like syntax in `.bxm` templates. Unlike classes, components
are designed for output generation and template composition. They live in the
`components/` directory of a module and are registered globally when the module loads.
## BoxLang Component Syntax — NOT CFML
All built-in and custom components in BoxLang use the `bx:` prefix.
**Never use `cf`-prefixed functions or tags** — those are CFML, not BoxLang.
```boxlang
// CORRECT BoxLang component syntax
bx:header name="Content-Type" value="application/json";
bx:location url="/dashboard" addToken=false;
bx:abort;
bx:include template="partials/nav.bxm";
// Paired component with body
bx:transaction {
// body
}
// WRONG \u2014 these are CFML, not BoxLang
cfheader( name="Content-Type", value="application/json" ) // \u274c CFML function
<cfabort> // \u274c CFML tag
<cflocation url="/dashboard"> // \u274c CFML tag
```
### Calling Components in Script
Self-closing components end with a **semicolon** to terminate the invocation:
```boxlang
// Self-closing \u2014 semicolon required in script
bx:header name="X-Custom" value="hello";
bx:setting showdebugoutput=false;
// Paired \u2014 body in braces (no trailing semicolon on the closing brace)
bx:savecontent variable="local.output" {
writeOutput(