Usage
Use the header, default and footer slots to add content to the Card.
<template>
<B24Card>
<template #header>
<Placeholder class="h-8" />
</template>
<Placeholder class="h-32" />
<template #footer>
<Placeholder class="h-8" />
</template>
</B24Card>
</template>
Title
Use the title prop to set the title of the Card's header.
<template>
<B24Card title="Card with title" class="w-full">
<Placeholder class="h-32" />
</B24Card>
</template>
Description
Use the description prop to set the description of the Card's header.
<template>
<B24Card
title="Card with description"
description="Lorem ipsum dolor sit amet, consectetur adipiscing elit."
class="w-full"
>
<Placeholder class="h-32" />
</B24Card>
</template>
Variant
Use the variant prop to change the variant of the Card.
<template>
<B24Card variant="outline">
<template #header>
<Placeholder class="h-8" />
</template>
<Placeholder class="h-32" />
<template #footer>
<Placeholder class="h-8" />
</template>
</B24Card>
</template>
Examples
Sales dynamics widget
Real-world example: a CRM dashboard widget assembled from Card (with the filled-copilot variant for the purple accent), Button, Tooltip and a small CSS grid for the metrics rows. The highlighted "Conversion" row is just a translucent overlay with bg-white/15 over the same card.
Render a CRM dashboard widget with a few metrics and a highlighted KPI row.
On a CRM dashboard, render a "Repeat sales dynamics" widget summarising deal volume and value. The card carries a copilot accent and a highlighted row at the bottom for the conversion KPI.
Requirements:
- Use
B24Cardwithvariant="filled-copilot". The#headerslot holds the title, two-line description and a top-right pillB24Button(rounded,color="air-tertiary-no-accent",:trailing-icon="RepeatIcon") that switches the date range - The body is a small CSS grid with three columns (
1fr_auto_auto) — first row carries the column headers ("Count" / "Amount"), then one row per metric. Each row sits onbg-white/5 rounded-xlso it reads as a row over the copilot fill - Render the highlighted KPI row with
bg-white/15 ring-1 ring-white/20for contrast. Pair the label with a smallInfo1Iconinside aB24Tooltipfor the description - The
#footerslot holds twoair-tertiary-no-accentbuttons aligned to opposite sides (Configureleft,Feedbackright) with leading icons (SettingsIcon,FeedbackIcon) - Drive the values from
rows: { label, count, amount }[]and an optionalhighlight: { label, count, amount, info }. Keep amounts pre-formatted strings to avoid coupling with a money formatter
Channel detail panel
Composed entity sidebar built entirely from standard components: Card (with divide-y body for automatic section dividers), a square Avatar, an AvatarGroup with overflow counter, Switch toggle rows, Badge counters and Empty section placeholders. Use it as a starting point for chat channel info panels or CRM record details.
Sales Department
Channel
Disabled
Media & Files
No media or files
Tasks
No tasks
Meetings
No meetings
Generate this layout with your AI assistant. The prompt asks the assistant to confirm the entity type and which sections you need before writing any code:
Build a Bitrix24-style entity detail sidebar from standard components.
You are a Bitrix24 UI expert. Help me build an entity detail sidebar (info panel) using only standard @bitrix24/b24ui-nuxt components, with minimal custom styling.
Before writing any code, ask me clarifying questions and wait for my answers:
- What entity is this panel for (chat channel, CRM contact/deal, project, something else)?
- Which header info should it show (avatar shape, title, subtitle, member group)?
- Which toggle settings do I need (e.g. notifications, auto-delete) and their default state?
- Which info rows and counters should appear (and which need a badge)?
- Which content sections do I need (e.g. Media & Files, Tasks, Meetings) and what is their empty state?
Once I confirm, build it with these conventions:
- Wrap everything in a
B24Cardwithclass="w-full max-w-xs overflow-hidden"and:b24ui="{ body: 'p-0 flex flex-col gap-0 divide-y divide-default' }"so each child section is auto-divided - Square the channel avatar with
B24Avatar :b24ui="{ root: 'rounded-xl' }"; show members withB24AvatarGroup :max="N"plus one extra child to render the+1counter - For toggle rows, put the icon outside and use
B24Switchwith thelabelprop for accessibility, reversing layout via:b24ui="{ root: 'flex-1 flex-row-reverse justify-between items-center', wrapper: 'ms-0' }" - Use
B24Badge ... squarefor numeric counters on info rows - Use
B24Emptyfor section empty states, flattened with:b24ui="{ root: 'ring-0 rounded-none py-3' }" - Use semantic text tokens (
text-label,text-description,text-dimmed) and<h3>for section headings
API
Props
Slots
Theme
export default {
slots: {
root: 'overflow-hidden rounded-(--ui-border-radius-md)',
header: 'p-[24px] sm:px-[22px] sm:py-[15px]',
title: 'font-[family-name:var(--ui-font-family-primary)] font-(--ui-font-weight-semi-bold) mb-0 text-pretty text-(length:--ui-font-size-2xl)/[normal]',
description: 'mt-1 text-pretty text-(length:--ui-font-size-lg)/[normal] text-pretty',
body: 'p-[24px] sm:px-[22px] sm:py-[15px]',
footer: 'p-[24px] sm:px-[22px] sm:py-[15px]'
},
variants: {
variant: {
filled: {
root: 'bg-(--ui-color-design-filled-bg) border border-(--ui-color-design-filled-stroke) border-(length:--ui-design-filled-stroke-weight) text-(--ui-color-design-filled-content)',
header: 'border-b border-(--ui-color-design-filled-content-divider) border-b-1',
footer: 'border-t border-(--ui-color-design-filled-content-divider) border-t-1',
title: 'text-(--ui-color-design-filled-content)',
description: 'text-(--ui-color-design-filled-content-secondary)'
},
'filled-success': {
root: 'bg-(--ui-color-design-filled-success-bg) border border-(--ui-color-design-filled-success-stroke) border-(length:--ui-design-filled-success-stroke-weight) text-(--ui-color-design-filled-success-content)',
header: 'border-b border-(--ui-color-design-filled-success-content-divider) border-b-1',
footer: 'border-t border-(--ui-color-design-filled-success-content-divider) border-t-1',
title: 'text-(--ui-color-design-filled-success-content)',
description: 'text-(--ui-color-design-filled-success-content)'
},
'filled-alert': {
root: 'bg-(--ui-color-design-filled-alert-bg) border border-(--ui-color-design-filled-alert-stroke) border-(length:--ui-design-filled-alert-stroke-weight) text-(--ui-color-design-filled-alert-content)',
header: 'border-b border-(--ui-color-design-filled-alert-content-divider) border-b-1',
footer: 'border-t border-(--ui-color-design-filled-alert-content-divider) border-t-1',
title: 'text-(--ui-color-design-filled-alert-content)',
description: 'text-(--ui-color-design-filled-alert-content-secondary)'
},
'filled-warning': {
root: 'bg-(--ui-color-design-filled-warning-bg) border border-(--ui-color-design-filled-warning-stroke) border-(length:--ui-design-filled-warning-stroke-weight) text-(--ui-color-design-filled-warning-content)',
header: 'border-b border-(--ui-color-design-filled-warning-content-divider) border-b-1',
footer: 'border-t border-(--ui-color-design-filled-warning-content-divider) border-t-1',
title: 'text-(--ui-color-design-filled-warning-content)',
description: 'text-(--ui-color-design-filled-warning-content)'
},
'filled-copilot': {
root: 'bg-(--ui-color-design-filled-copilot-bg) border border-(--ui-color-design-filled-copilot-stroke) border-(length:--ui-design-filled-copilot-stroke-weight) text-(--ui-color-design-filled-copilot-content)',
header: 'border-b border-(--ui-color-design-filled-copilot-content-divider) border-b-1',
footer: 'border-t border-(--ui-color-design-filled-copilot-content-divider) border-t-1',
title: 'text-(--ui-color-design-filled-copilot-content)',
description: 'text-(--ui-color-design-filled-copilot-content)'
},
'filled-no-accent': {
root: 'bg-(--ui-color-design-filled-na-bg) border border-(--ui-color-design-filled-na-stroke) border-(length:--ui-design-filled-na-stroke-weight) text-(--ui-color-design-filled-na-content)',
header: 'border-b border-(--ui-color-design-filled-na-content-divider) border-b-1',
footer: 'border-t border-(--ui-color-design-filled-na-content-divider) border-t-1',
title: 'text-(--ui-color-design-filled-na-content)',
description: 'text-(--ui-color-design-filled-na-content)'
},
'filled-black': {
root: 'bg-(--ui-color-design-filled-black-bg) border border-(--ui-color-design-filled-black-stroke) border-(length:--ui-design-filled-black-stroke-weight) text-(--ui-color-design-filled-black-content)',
header: 'border-b border-(--ui-color-design-filled-black-content-divider) border-b-1',
footer: 'border-t border-(--ui-color-design-filled-black-content-divider) border-t-1',
title: 'text-(--ui-color-design-filled-black-content)',
description: 'text-(--ui-color-design-filled-black-content)'
},
tinted: {
root: 'bg-(--ui-color-design-tinted-bg) border border-(--ui-color-design-tinted-stroke) border-(length:--ui-design-tinted-stroke-weight) text-(--ui-color-design-tinted-content)',
header: 'border-b border-(--ui-color-design-tinted-content-divider) border-b-1',
footer: 'border-t border-(--ui-color-design-tinted-content-divider) border-t-1',
title: 'text-(--ui-color-design-tinted-content)',
description: 'text-(--ui-color-design-tinted-content)'
},
'tinted-alt': {
root: 'bg-(--ui-color-design-tinted-bg-alt) border border-(--ui-color-design-tinted-stroke) border-(length:--ui-design-tinted-stroke-weight) text-(--ui-color-design-tinted-content)',
header: 'border-b border-(--ui-color-design-tinted-content-divider) border-b-1',
footer: 'border-t border-(--ui-color-design-tinted-content-divider) border-t-1',
title: 'text-(--ui-color-design-tinted-content)',
description: 'text-(--ui-color-design-tinted-content)'
},
'tinted-accent-1': {
root: 'bg-(--ui-color-design-tinted-a1-bg) border border-(--ui-color-design-tinted-a1-stroke) border-(length:--ui-design-tinted-a1-stroke-weight) text-(--ui-color-design-tinted-a1-content)',
header: 'border-b border-(--ui-color-design-tinted-a1-content-divider) border-b-1',
footer: 'border-t border-(--ui-color-design-tinted-a1-content-divider) border-t-1',
title: 'text-(--ui-color-design-tinted-a1-content)',
description: 'text-(--ui-color-design-tinted-a1-content)'
},
'tinted-success': {
root: 'bg-(--ui-color-design-tinted-success-bg) border border-(--ui-color-design-tinted-success-stroke) border-(length:--ui-design-tinted-success-stroke-weight) text-(--ui-color-design-tinted-success-content)',
header: 'border-b border-(--ui-color-design-tinted-success-content-divider) light:border-(--ui-color-accent-soft-green-1) border-b-1',
footer: 'border-t border-(--ui-color-design-tinted-success-content-divider) light:border-(--ui-color-accent-soft-green-1) border-t-1',
title: 'text-(--ui-color-design-tinted-success-content)',
description: 'text-(--ui-color-design-tinted-success-content)'
},
'tinted-alert': {
root: 'bg-(--ui-color-design-tinted-alert-bg) border border-(--ui-color-design-tinted-alert-stroke) border-(length:--ui-design-tinted-alert-stroke-weight) text-(--ui-color-design-tinted-alert-content)',
header: 'border-b border-(--ui-color-design-tinted-alert-content-divider) border-b-1',
footer: 'border-t border-(--ui-color-design-tinted-alert-content-divider) border-t-1',
title: 'text-(--ui-color-design-tinted-alert-content)',
description: 'text-(--ui-color-design-tinted-alert-content)'
},
'tinted-warning': {
root: 'bg-(--ui-color-design-tinted-warning-bg) border border-(--ui-color-design-tinted-warning-stroke) border-(length:--ui-design-tinted-warning-stroke-weight) text-(--ui-color-design-tinted-warning-content)',
header: 'border-b border-(--ui-color-design-tinted-warning-content-divider) border-b-1',
footer: 'border-t border-(--ui-color-design-tinted-warning-content-divider) border-t-1',
title: 'text-(--ui-color-design-tinted-warning-content)',
description: 'text-(--ui-color-design-tinted-warning-content)'
},
'tinted-no-accent': {
root: 'bg-(--ui-color-design-tinted-na-bg) border border-(--ui-color-design-tinted-na-stroke) border-(length:--ui-design-tinted-na-stroke-weight) text-(--ui-color-design-tinted-na-content)',
header: 'border-b border-(--ui-color-design-tinted-na-content-divider) border-b-1',
footer: 'border-t border-(--ui-color-design-tinted-na-content-divider) border-t-1',
title: 'text-(--ui-color-design-tinted-na-content)',
description: 'text-(--ui-color-design-tinted-na-content)'
},
outline: {
root: 'bg-(--ui-color-design-outline-bg) border border-(--ui-color-design-outline-stroke) border-(length:--ui-design-outline-stroke-weight) text-(--ui-color-design-outline-content)',
header: 'border-b border-(--ui-color-design-outline-content-divider) border-b-1',
footer: 'border-t border-(--ui-color-design-outline-content-divider) border-t-1',
title: 'text-(--ui-color-design-outline-content)',
description: 'text-(--ui-color-design-outline-content-secondary)'
},
'outline-alt': {
root: 'bg-(--ui-color-design-outline-bg-alt) border border-(--ui-color-design-outline-content-divider) border-(length:--ui-design-outline-stroke-weight-alt) text-(--ui-color-design-outline-content)',
header: 'border-b border-(--ui-color-design-outline-content-divider) border-b-1',
footer: 'border-t border-(--ui-color-design-outline-content-divider) border-t-1',
title: 'text-(--ui-color-design-outline-content)',
description: 'text-(--ui-color-design-outline-content-secondary)'
},
'outline-accent': {
root: 'bg-(--ui-color-design-outline-a1-bg) border border-(--ui-color-design-outline-a1-stroke) border-(length:--ui-design-outline-a1-stroke-weight) text-(--ui-color-design-outline-a1-content)',
header: 'border-b border-(--ui-color-design-outline-a1-content-divider) border-b-1',
footer: 'border-t border-(--ui-color-design-outline-a1-content-divider) border-t-1',
title: 'text-(--ui-color-design-outline-a1-content)',
description: 'text-(--ui-color-design-outline-a1-content)'
},
'outline-accent-2': {
root: 'bg-(--ui-color-design-outline-a2-bg) border border-(--ui-color-design-outline-a2-stroke) border-(length:--ui-design-outline-a2-stroke-weight) text-(--ui-color-design-outline-a2-content)',
header: 'border-b border-(--ui-color-design-outline-a2-content-divider) border-b-1',
footer: 'border-t border-(--ui-color-design-outline-a2-content-divider) border-t-1',
title: 'text-(--ui-color-design-outline-a2-content)',
description: 'text-(--ui-color-design-outline-a2-content)'
},
'outline-success': {
root: 'bg-(--ui-color-design-outline-success-bg) border border-(--ui-color-design-outline-success-stroke) border-(length:--ui-design-outline-success-stroke-weight) text-(--ui-color-design-outline-success-content)',
header: 'border-b border-(--ui-color-design-outline-success-content-divider) border-b-1',
footer: 'border-t border-(--ui-color-design-outline-success-content-divider) border-t-1',
title: 'text-(--ui-color-design-outline-success-content)',
description: 'text-(--ui-color-design-outline-success-content)'
},
'outline-alert': {
root: 'bg-(--ui-color-design-outline-alert-bg) border border-(--ui-color-design-outline-alert-stroke) border-(length:--ui-design-outline-alert-stroke-weight) text-(--ui-color-design-outline-alert-content)',
header: 'border-b border-(--ui-color-design-outline-alert-content-divider) border-b-1',
footer: 'border-t border-(--ui-color-design-outline-alert-content-divider) border-t-1',
title: 'text-(--ui-color-design-outline-alert-content)',
description: 'text-(--ui-color-design-outline-alert-content)'
},
'outline-warning': {
root: 'bg-(--ui-color-design-outline-warning-bg) border border-(--ui-color-design-outline-warning-stroke) border-(length:--ui-design-outline-warning-stroke-weight) text-(--ui-color-design-outline-warning-content)',
header: 'border-b border-(--ui-color-design-outline-warning-content-divider) light:border-(--ui-color-accent-soft-orange-1) border-b-1',
footer: 'border-t border-(--ui-color-design-outline-warning-content-divider) light:border-(--ui-color-accent-soft-orange-1) border-t-1',
title: 'text-(--ui-color-design-outline-warning-content)',
description: 'text-(--ui-color-design-outline-warning-content)'
},
'outline-copilot': {
root: 'bg-(--ui-color-design-outline-copilot-bg) border border-(--ui-color-design-outline-copilot-stroke) border-(length:--ui-design-outline-copilot-stroke-weight) text-(--ui-color-design-outline-copilot-content)',
header: 'border-b border-(--ui-color-design-outline-copilot-content-divider) border-b-1',
footer: 'border-t border-(--ui-color-design-outline-copilot-content-divider) border-t-1',
title: 'text-(--ui-color-design-outline-copilot-content)',
description: 'text-(--ui-color-design-outline-copilot-content)'
},
'outline-no-accent': {
root: 'bg-(--ui-color-design-outline-na-bg) border border-(--ui-color-design-outline-na-stroke) border-(length:--ui-design-outline-na-stroke-weight) text-(--ui-color-design-outline-na-content)',
header: 'border-b border-(--ui-color-design-outline-na-content-divider) border-b-1',
footer: 'border-t border-(--ui-color-design-outline-na-content-divider) border-t-1',
title: 'text-(--ui-color-design-outline-na-content)',
description: 'text-(--ui-color-design-outline-na-content)'
},
plain: {
root: 'bg-(--ui-color-design-plain-bg) border border-(--ui-color-design-plain-stroke) border-(length:--ui-design-plain-stroke-weight) text-(--ui-color-design-plain-content)',
header: 'border-b border-(--ui-color-design-plain-content-divider) border-b-1',
footer: 'border-t border-(--ui-color-design-plain-content-divider) border-t-1',
title: 'text-(--ui-color-design-plain-content)',
description: 'text-(--ui-color-design-plain-content)'
},
'plain-accent': {
root: 'bg-(--ui-color-design-plain-a-bg) border border-(--ui-color-design-plain-a-stroke) border-(length:--ui-design-plain-a-stroke-weight) text-(--ui-color-design-plain-a-content)',
header: 'border-b border-(--ui-color-design-plain-a-content-divider) border-b-1',
footer: 'border-t border-(--ui-color-design-plain-a-content-divider) border-t-1',
title: 'text-(--ui-color-design-plain-a-content)',
description: 'text-(--ui-color-design-plain-a-content)'
},
'plain-no-accent': {
root: 'bg-(--ui-color-design-plain-na-bg) border border-(--ui-color-design-plain-na-stroke) border-(length:--ui-design-plain-na-stroke-weight) text-(--ui-color-design-plain-na-content)',
header: 'border-b border-(--ui-color-design-plain-na-content-divider) border-b-1',
footer: 'border-t border-(--ui-color-design-plain-na-content-divider) border-t-1',
title: 'text-(--ui-color-design-plain-na-content)',
description: 'text-(--ui-color-design-plain-na-content-secondary)'
},
selection: {
root: 'bg-(--ui-color-design-selection-bg) border border-(--ui-color-design-selection-stroke) border-(length:--ui-design-selection-stroke-weight) text-(--ui-color-design-selection-content)',
header: 'border-b border-(--ui-color-design-selection-content-divider) border-b-1',
footer: 'border-t border-(--ui-color-design-selection-content-divider) border-t-1',
title: 'text-(--ui-color-design-selection-content)',
description: 'text-(--ui-color-design-selection-content)'
}
}
},
defaultVariants: {
variant: 'outline'
}
}