Blocks

Blocks

Overview

Pala Blocks are self-contained page sections that couple both code and content at the component level. Each block contains its own code, styles, and content fields, making them portable and reusable across sites.

Block Structure

A Pala block consists of:

Code

  • Contains the block's markup and logic

  • Integrates content fields

  • Includes scoped styles

Content (Fields & Entries)

  • Define editable areas

  • Configured within the block

  • Accessible through visual editor and form fields

Creating a Block

Pala has a growing library of free blocks you can use as-is or as starting points for more complex blocks, but you of course also have the option of building blocks from scratch.

Basic Structure

All blocks are made up of at least one field integrated within the HTML. The code and field below demonstrates how to create a simple block with an editable heading.

HTML

Content Field

Content Entry

Development Features

  • Responsive live preview while editing

  • Toggle between code and content modes

  • PostCSS support for nesting and auto-prefixing

  • NPM library integration without installation

  • Scoped CSS by default