Layout

Components•4 min read|
|

DocsLit provides layout components for multi-column grids, panels, frames, and side content.

Columns

Create multi-column layouts with wc-columns:

<wc-columns cols="2"> <div> **Column one** Content for the left column with Markdown support. </div> <div> **Column two** Content for the right column. </div> </wc-columns>

Column one

Content for the left column with Markdown support.

Column two

Content for the right column.

The number of columns. Columns collapse to a single column on mobile screens. The gap between columns. Accepts any CSS value.

Three columns

<wc-columns cols="3"> <div> **Install** Set up DocsLit in your project. </div> <div> **Write** Create pages in Markdown. </div> <div> **Deploy** Build and publish your site. </div> </wc-columns>

Install

Set up DocsLit in your project.

Write

Create pages in Markdown.

Deploy

Build and publish your site.

Panels

Panels are bordered containers with a header:

<wc-panel title="Configuration"> Set `name` in your `docslit.json` to change the site title. </wc-panel>

Set name in your docslit.json to change the site title.

The panel header text. An icon displayed next to the title: a Lucide or Font Awesome name, or an emoji. Pin the panel to dark or light.

Frames

Frames wrap images or media with an optional caption and hint:

<wc-frame caption="The DocsLit dashboard" hint="Click to enlarge" border background="subtle"> ![Dashboard screenshot](https://placehold.co/600x300) </wc-frame>

A caption displayed below the content. Inline Markdown works. Text shown above the frame. Inline Markdown works, including links. Links can be relative paths, #anchors, http(s): or mailto: URLs; any other link target, such as javascript:, is shown as plain text. Draw a border around the framed content. The frame background: default or subtle. Pin the frame to dark or light.

Images inside a frame keep their click-to-zoom behavior. See Images for dark-mode variants and how to turn zoom off.

Aside

Float supplementary content to the side of your main text. Add sticky to keep it in view while the reader scrolls:

<wc-aside title="Related" sticky> See [theming](../customization/theming) for customization options. </wc-aside> A heading for the aside. Pin the aside below the header while the page scrolls. Pin the aside to dark or light.

See theming for customization options.

The aside floats to the right on wide screens and sits inline on small screens. Put it near the top of the section it belongs to, because it floats next to the text that follows it.

Indent

Add a colored left border for visual grouping:

<wc-indent color="#3b82f6"> This content has a blue left border to set it apart from the surrounding text. </wc-indent>

This content has a blue left border to set it apart from the surrounding text.

The indentation depth. The border color. Accepts any CSS color value.