Skip to content
ФреймворкJavaScript

Колонки: многоколоночная вёрстка страницы

A layout block that arranges its children into side-by-side columns. The column list itself holds no content — each column is a child `column` block, and the blocks you write live inside those columns (via `contentIds`). Columns can be created three ways: from the toolbox · by dragging a block beside another · by selecting multiple blocks and choosing "Turn into columns". Column widths are resizable via the separators between columns.

Импорт

TypeScript
import { ColumnList } from '@bloklabs/core/tools';

Формат данных

TypeScript
interface ColumnListData {
  // No persisted fields. The structure lives in the block's contentIds,
  // which reference the child column blocks.
  // (columnCount and noSeed are transient seed hints, never saved.)
}
JSON
{
  "id": "col001",
  "type": "column_list",
  "data": {},
  "contentIds": ["column1", "column2"]
}

Пример использования

TypeScript
import { Blok } from '@bloklabs/core';
import { ColumnList, Column } from '@bloklabs/core/tools';

const editor = new Blok({
  holder: 'editor',
  tools: {
    column_list: {
      class: ColumnList,
    },
    column: {
      class: Column,
    },
  },
});