Skip to content
Search
K
Main Navigation
Start
Learn
Reference
Playground
Appearance
Return to top
gsx
Playground
Component declaration
Go code block
Void elements
Raw-text elements
Self-closing non-void elements
HTML comments
Attribute comments
Content comments
Bare line comments
Field access
Function (T, error) unwrap
Error unwrap: component input
Boolean Attributes
Conditional Attributes
Spread Attributes
Ordered Attributes
Attribute Contexts
Verbatim component signature
Signature shapes
Explicit parameter forwarding
Class & style merging
Filter arguments
Pipelines in attribute context
Interpolating attribute literals
URL attribute literals are sanitized whole
Interpolated class literal merges with a spread bag
Body backtick literals
Whole-literal pipelines
Forwarding through components
Interpolation & inputs
Expression Attributes
Auto-escaping & safe raw
If / else
Loops over lists
Switch
Components & inputs
Children
Named slots
Template composition
Explicit attribute forwarding
Method components
Generic components
Explicit type arguments
Composable class
Style blocks
Pipelines / filters
Fragments
Forms
JS attributes & data islands
Full HTML document
Wrapper pattern
Init statement
Script interpolation
Attribute-local JS handler
Alpine dropdown
Complete Alpine search
JSON attribute values
Raw HTML
Reading context
▾
edited · press Run
auto-run
Format
Share
Run
Component
.gsx
render — the expression to render
Greeting("World", 3)
Preview
HTML
Generated Go
Problems
— no output —
— no output —
✓ no problems