The DlFeaturesGrid block component renders a responsive grid of feature tiles using named slots. The tiles sit in DlGrid. Each tile is defined in a slot and parsed for its position, title, description, icon, and optional link, then animated into view.
Features
- 🧩 grid-based, responsive layout
- 🪄 animated reveal with staggered timing
- 🏷️ tiles defined via named slots with structured content
- 🖼️ icon support per tile
- 🔗 optional per-tile navigation
- 🧩 theme-friendly visual adjustments
- ⚠️ extensive error reporter
Usage
Use ::dl-features-grid as a block component to define tiles using named slots. Each slot name is #item-{n} plus the same position suffix as DlGrid. The slot body uses section markers for title, description, icon, and an optional link.
Slot content formatting
The component parses each tile’s slot content using a simple marker syntax - {marker}...{/marker}. Here are the available markers:
| marker | required | description |
|---|---|---|
title | ✔ | Tile title. |
description | ✔ | Tile description. Inline formatting via strong, italic, code, and line breaks with br. Use |
icon | ✔ | Icon name (for example: |
link | ✗ | Optional. A |
Since Vue's useSlots has an internal mechanism that escapes special characters, we've provided dedicated markers (e.g., /strong/) to allow you to introduce special formatting into the tiles' content.
More about available icon sets you can read here.
Result:
Positioning
Position uses the same grid lines as DlGrid. Two numbers after the slot name are the column range. Four numbers add the row range: #item-1|1-5 or #item-1|1-5-1-2. Lines run from 1 through 13, and the end line must be greater than the start line.
Props
Here are the properties you can use with the DlFeaturesGrid component. Each property should be set on an individual component instance; they do not affect the global configuration. More about defining properties in MDC components you can read here.
| name | type | default | description |
|---|---|---|---|
lazy | boolean | undefined | Whether to lazy load the component. |
gridCols | 'lg:grid-cols-${number}' | 'lg:grid-cols-8' | Grid columns at large breakpoints. Mobile alignment will be set automatically. |
gridRows | 'lg:grid-rows-${number}' | 'lg:grid-rows-1' | Grid rows at large breakpoints. Mobile alignment will be set automatically. |
animatedBorder | boolean | true | Whether to animate the tile overlay on hover. |
Slots
| name | description |
|---|---|
#item-{n}|{c-c}-{r-r}? | One tile. Add a position suffix for columns or columns and rows. Body contains |
ui | Dedicated slot for defining the component’s |
Styling
Styling from Markdown
Every DocLayer component can be styled directly within your Markdown file using dedicated slot/property configuration. This allows you to customize the appearance of the component's markup elements without modifying global styles. More about components styling you can read here.
Below you'll find the default set of Tailwind classes for the component's dedicated markup elements.
CSS Variables
Here is a set of CSS variables you can use to customize the appearance of the DlFeaturesGrid component globally. More about theming and styling with CSS variables, you can read here.
CSS Utilities
Below are the CSS utility classes used by the DlFeaturesGrid component. They make use of the CSS variables described above and define the default styling for the component's markup elements.
