Использование
Markdown в слоте по умолчанию компонента card выделяет содержимое.
Пропсы title, icon и color настраивают карточку. Также можно передать любые свойства компонента <NuxtLink>.
::card{title="Startup" color="air-primary" to="https://www.bitrix24.com/prices/" target="_blank"}
Best suited for small teams, startups and agencies with up to 5 developers.
::
API
Пропсы
Слоты
Тема
https://github.com/bx-shef/b24-ui/tree/main/src/theme/card.ts
export default {
slots: {
base: 'group relative block my-5 p-4 sm:p-6 text-(--b24ui-color) border border-(--ui-color-design-tinted-na-stroke) bg-(--b24ui-background) rounded-md transition-colors',
icon: 'size-6 mb-2 block text-(--b24ui-icon)',
title: 'text-(--b24ui-color) font-(--ui-font-weight-semi-bold)',
description: 'text-[15px] text-(--b24ui-color) [&_p]:text-(--b24ui-color) *:first:mt-0 *:last:mb-0 *:my-1',
externalIcon: 'size-4 align-top absolute end-2 top-2 pointer-events-none text-(--b24ui-split-divider-color) transition-colors'
},
variants: {
color: {
'air-primary': {
base: 'style-filled'
},
'air-primary-success': {
base: 'style-filled-success'
},
'air-primary-alert': {
base: 'style-filled-alert'
},
'air-primary-copilot': {
base: 'style-filled-copilot'
},
'air-primary-warning': {
base: 'style-filled-warning'
},
'air-secondary': {
base: 'style-tinted'
},
'air-secondary-alert': {
base: 'style-tinted-alert'
},
'air-secondary-accent': {
base: 'style-tinted-no-accent-1'
},
'air-secondary-accent-1': {
base: 'style-outline-accent-1'
},
'air-secondary-accent-2': {
base: 'style-outline-accent-2'
},
'air-secondary-no-accent': {
base: 'style-outline'
},
'air-tertiary': {
base: 'style-outline-no-accent'
}
},
to: {
true: ''
},
title: {
true: {
description: 'mt-1'
}
}
},
compoundVariants: [
{
to: true,
class: {
base: 'hover:bg-(--ui-color-bg-content-secondary) hover:border-(--b24ui-border-color-hover) has-focus-visible:border-(--b24ui-border-color-hover)',
title: 'group-hover:text-(--b24ui-border-color)',
description: 'group-hover:text-(--b24ui-border-color) [&_p]:group-hover:text-(--b24ui-border-color)',
externalIcon: 'group-hover:text-(--b24ui-icon)'
}
}
],
defaultVariants: {
color: 'air-primary'
}
}