Components Introduction

Overview of DocLayer’s built-in Markdown content components

We think that built-in components might be one of the most powerful features of DocLayer. They allow you to manage and present a wide variety of content blocks directly within your Markdown files, all without unnecessary clutter or complexity. With components, you can easily format your content, making it more engaging and easier to read for your audience.

It's all about components

Our goal from the beginning was to provide a great portion of content presentation blocks, so you wouldn’t need to create your own from scratch. We also wanted to give you plenty of options to customize and configure these components to match your design preferences. By building on top of Nuxt UI, our components are not only well-designed but also follow the best accessibility practices.

MDC

Our components are the standard Vue ones, they're created and managed just like any other in the Vue-based application. To make these components available in Markdown, we use the MDC renderer (included with Nuxt Content), which provides a universal, and readable format for using components directly alongside your content, which ensures an interactive and dynamic experience across your application, all without requiring knowledge of Vue.

In-module location and naming

All built-in components are stored in the special virtual .doclayer folder inside the app directory. These components are designed specifically for use within your content. Each name starts with the Dl prefix, avoiding conflicts and making easier to distinguish them from your own custom components.

Building content components

You're not limited to using only the built-in components - you can also create your own ones, and enhance your content as needed. To make this process easier, we've provided a DlWrapper component that streamlines development and equips all your content components with powerful, prebuilt features - so you don't have to reinvent the wheel.

Available content components

Below you'll find a list of prebuilt content components that are ready to use inside your content pages. On the following pages, we've provided detailed descriptions for each, including instructions on how to use, configure, and style them. If somehow it's not enough, and you'd like to create your own components, please refer to the dedicated guide available here.

NameDescriptionTypeDocs
DlCode

Easily display code snippets of any language with smart layout adoptability. Powered by the Shiki highlighter for visually stunning, readable code blocks.

BlockGo to page
DlCodeInline

Displays inline code that matches backtick styling but stays on one line (tables, types, long identifiers). Shorthand MDC tag: :dl-code-i.

InlineGo to page
DlCallout

Displays an attention-grabbing information block with a customizable title, icon, and type.

BlockGo to page
DlBadge

Displays an inline status label with Callout-aligned types, colors, and optional icons. Also used for navigation badges.

InlineGo to page
DlStepper

Displays a step-by-step progress indicator for guiding users through multi-stage processes or workflows.

BlockGo to page
DlLink

Enhanced link component with smart caching and a centralized URL repository for efficient, consistent link management across your content.

InlineGo to page
DlFormat

Formats Markdown content into a structured HTML. Can be applied only for the primitive notations like bold, italic, backticks, etc.

InlineGo to page
DlImage

Displays an optimized, responsive image with support for captions, alt text, and custom styling. Uses NuxtImage to enhance accessibility and performance.

InlineGo to page
DlTooltip

Displays a tooltip with custom :br: content when users hover over :br: or focus on an element, providing :br: helpful inline hints or explanations.

InlineGo to page
DlPrompter

Allows to add hidden context or instructions for the search assistant, improving the quality and relevance of AI-generated answers.

InlineGo to page
DlRenderer

Renders reusable Markdown components from a special content-insensitive location. Handles safe resolution, property overriding, and smart caching for efficient and flexible content reuse.

InlineGo to page
DlGrid

Lays named slots out on a responsive grid, with alignment and justification of content inside each cell.

BlockGo to page
DlSection

Wraps content within the section boundary.

BlockGo to page

We also offer components to help you build landing pages, all within Markdown. There's nothing extra you need to do; just use them as you would any other component.

NameDescriptionTypeDocs
DlHero

Displays a leading hero section for your landing page, featuring a headline, description, and optional call-to-action.

BlockGo to page
DlHeading

Flexible section heading with support for subtitles and descriptions, ensuring consistent and attractive titles throughout your promo pages.

BlockGo to page
DlFeaturesGrid

Displays a responsive grid of features or benefits, ideal for showcasing what your product or documentation offers. Highly customizable layout and icons.

BlockGo to page
DlNewsletter

Embeds a newsletter signup form directly in your content, making it easy to collect emails and grow your audience. Integrates with email adapters.

InlineGo to page
DlTypeman

Animated typewriter effect for headlines, perfect for drawing attention to key words or phrases in your hero section.

InlineGo to page

Planned content components

Below you'll find a list of components that are planned or currently under development, and are not available yet.

NameDescriptionTypeDocs
DlTabs

Displays tabbed content for organizing information into separate, easily navigable sections.

Block
coming soon
DlCollapsible

Allows content to be collapsed or expanded, perfect for FAQs or hiding advanced details.

Block
coming soon
DlAccordion

Presents a set of expandable/collapsible panels for structured, interactive content display.

Block
coming soon
DlModal

Displays modal dialogs for additional information, confirmations, or interactive content.

Block
coming soon
DlEmbedding

Easily embed external content such as videos, tweets, or iframes directly in your Markdown.

Inline
coming soon

Now that you know which components are available for use in your content, explore each component’s dedicated documentation page to learn how to use, configure, and style them effectively. We also provide practical examples and use cases to help you get the most out of each component.

Restricted components

The following component names are reserved and cannot be overwritten by custom components. Attempting to create a custom component with any of these names will result in a conflict, and the built-in version will always take precedence.

NamePurpose / Notes
DlCode

Code block(s) component

DlCodeInline

Inline code without wrapping

DlCodeI

MDC alias for DlCodeInline (:dl-code-i)

DlCodeHighlighter

Code highlighter

DlCallout

Callout/alert/info box

DlBadge

Compact status badge / label

DlStepper

Stepper/progress indicator

DlLink

Enhanced link, cached, with URL management

DlImage

Optimized image with captions and accessibility

DlTooltip

Tooltip for inline hints

DlPrompter

Hidden AI context instructions

DlHero

Hero section for promo pages

DlHeroTypeman

Animated typewriter effect for headlines

DlHeading

Section heading with subtitle/description

DlFeaturesGrid

Responsive grid for features/benefits

DlNewsletter

Newsletter signup form

DlWrapper

Internal custom components wrapper

DlRenderer

Internal Markdown components renderer

DlSection

Section wrapper for Table of Contents intersection

DlGrid

Responsive content grid with named item slots

DlUiEmptyPager

Rendering empty pagination states in navigation

DlUiSkeletonCode

Skeleton loader for code blocks

DlUiSkeletonNavigation

Skeleton loader for navigation menus

Note: These names are reserved for internal DocLayer components. If you need to create your own components, use a different name to avoid conflicts.