Skip to content

Description List

Description List is a component used to display key-value pairs in a structured format. Ideal for showing metadata, user info, or item details, and styled using Tailwind CSS for consistent layout and spacing.


<script setup>
defineProps({
label: {
type: String,
required: true,
},
value: null,
});
</script>
<template>
<div>
<dt class="text-gray-600">
{{ label }}
</dt>
<dd class="text-gray-900 font-bold">
<slot>{{ value }}</slot>
</dd>
</div>
</template>
PropTypeDefaultRequiredDescription
labelStringYesThe label or term to display in the list.
valueNoThe value or description associated with the label.
SlotDescription
defaultThe content to be rendered as the description value. Overrides the value prop when used.