Primitives are built-in elements that handle common patterns like headings and paragraphs.
What are Primitives?
Primitives are special elements that are always available in Chalk, regardless of which library you’re using. Unlike custom elements that you define in your library, primitives are built into the Chalk language itself.
Common Primitives
Headings
# Level 1 Heading
## Level 2 Heading
### Level 3 Heading
#### Level 4 Heading
##### Level 5 Heading
###### Level 6 Heading
Paragraphs
This is a regular paragraph.
paragraph(color: blue) {
This paragraph has custom attributes.
}
Why Primitives?
- Always Available: Work in any Chalk document without library setup
- Standard Syntax: Common patterns like headings have familiar syntax
- Performance: Optimized built-in implementations
- Consistency: Same behavior across all Chalk projects
Next Steps
- Language Guide - Back to language guide index
- API Reference - Complete list of all primitive elements and types
- Elements Reference - Learn about custom elements
- Attributes Guide - Understand attribute syntax and types
- Formatting Guide - Inline text formatting
- Language Overview - File types and basic syntax
- Home - Back to documentation home