Skip to content

Frames & Elements

Everything in Caja is a frame. A frame is a node in the layout tree with properties that map to CSS.

Element Types

TypeDescriptionHTML Tag
BoxGeneric containerdiv, section, header, footer, nav, main, article, aside
TextText contentp, h1h6, span
ImageImage elementimg
ButtonClickable buttonbutton
InputText inputinput
TextareaMulti-line inputtextarea
SelectDropdown selectselect
LinkAnchor elementa

The Frame Tree

Frames are nested in a tree structure. Every page has a root frame (called Body in the Layers Panel) that acts as the top-level container. All other frames are children (or descendants) of the root.

Frame tree in the Layers Panel

Naming

Every frame has a display name. Names are used as:

  • Labels in the Layers Panel
  • Override keys when using components
  • Class names in exported code

Double-click a frame in the tree or press F2 to rename it.

Grouping

Select one or more frames and press ⌘G to wrap them in a new parent box. Press ⌘⇧G to ungroup (remove the wrapper and move children up).