Liking cljdoc? Tell your friends :D

<x-bento-item>

A structural wrapper that controls column and row spanning inside an <x-bento-grid>. Purely layout — add visual styling via slotted content (e.g. <x-card>).

Tag Name

x-bento-item

Attributes

AttributeTypeDefaultDescription
col-spaninteger (1–6)1Number of grid columns to span.
row-spaninteger (1–6)1Number of grid rows to span.
orderintegerCSS order for reordering within the grid.

Out-of-range span values are clamped (minimum 1, maximum 6). Invalid values fall back to 1.

Slots

SlotDescription
(default)Cell content. Any HTML or web component.

Parts

PartElementDescription
base<div>Inner wrapper (width: 100%; height: 100%).

Inline Styles

The component sets these CSS properties directly on the host element so they participate in the parent grid layout:

PropertyValue
grid-columnspan <col-span>
grid-rowspan <row-span>
order<order> (only when set)

Usage

<x-bento-grid columns="4" gap="md">
  <!-- 2×2 hero cell -->
  <x-bento-item col-span="2" row-span="2">
    <x-card variant="elevated" padding="lg">
      <h2>Featured</h2>
    </x-card>
  </x-bento-item>

  <!-- Default 1×1 cells -->
  <x-bento-item>
    <x-card variant="outlined" padding="md">Item A</x-card>
  </x-bento-item>
  <x-bento-item>
    <x-card variant="outlined" padding="md">Item B</x-card>
  </x-bento-item>

  <!-- Wide 2×1 cell -->
  <x-bento-item col-span="2">
    <x-card variant="filled" padding="md">Wide content</x-card>
  </x-bento-item>
</x-bento-grid>

ESM Import

import "@vanelsas/baredom/x-bento-item";

Accessibility

This is a purely structural layout component. It does not add ARIA roles. Ensure slotted content is accessible independently.

Can you improve this documentation?Edit on GitHub

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close