The DlHero block component renders a prominent hero section with a title, lead text, optional content, and a call-to-action (CTA). It integrates with your theme via utilities and exposes named slots for fine-grained control.
Features
- đź§ opinionated layout with grid-based positioning
- 🏷️ named slots for
title,lead, andcontent - đź”— configurable CTA as link or button
- 🖼️ optional logo image
- đź§© theme-friendly visual adjustments
Usage
Use ::dl-hero as a block component with content through the named slots. Set the CTA via props.
Result:
Build with confidence
With a logo image
To display a logo image (or any other image) in the hero section, set the logo-path prop to the image's path in the public directory. You can manage its style using the #ui slot.
Result:

Build with confidence
Props
Here are the properties you can use with the DlHero 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. |
ctaType |
| 'link' | Determines whether the CTA renders as a text link or a button. |
ctaLink | string | undefined | Destination URL for the CTA. |
ctaLabel | string | undefined | Label displayed for the CTA. |
logoPath | '/${string}' | undefined | Path to the logo image, located in the |
Slots
| name | description |
|---|---|
title | Title slot. Use plain text or Markdown. |
lead | Lead slot, short descriptive text under the title. |
content | Additional content under the lead. Supports inline components. |
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 DlHero 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 DlHero component. They make use of the CSS variables described above and define the default styling for the component's markup elements.
Accessibility
Ensure your title and lead provide a clear and concise message. If you want a stronger emphasis on the hero section, consider using CTA as a button that should be easily identifiable and actionable.