Skip to content
duxt

Code group

Several fences as one tabbed block, labelled by filename.

Several fenced blocks shown as one block with a tab each. The label of every tab is the fence's own filename, because that is what the reader is choosing between and it is already written.

Usage

export default defineNuxtConfig({
  extends: ['@kirchdev/duxt']
});

API

No props. A fence without a filename gets its language as the label.

Slots

SlotWhat goes in it
defaultA run of fenced blocks

Notes

The children are read from the default slot's VNodes rather than registered by a child component: a fence is a ProsePre, not something this block can ask to announce itself, and its filename is a prop on that node.

For anything that is not code, use Tab group.

Was this page helpful?