v2.1.8
  • Get Started
  • Components
  • Composables
  • Typography
  • GitHub
  • Overview
  • Introduction
  • Headers and text
  • Lists and tables
  • Images and embeds
  • Code
  • Components
  • Accordion
  • Badge
  • Callout
  • Card
  • CardGroup
  • CodeCollapse
  • CodeGroup
  • CodePreview
  • Collapsible
  • Field
  • FieldGroup
  • Kbd
  • Steps
  • Tabs
  • b24icons
  • b24jssdk
Use our Nuxt starter
v2.1.8
  • Docs
  • Components
  • Composables
  • Typography

Callout

Organize critical content for easy scanning with colored panels and intuitive symbols.
GitHub
Nuxt UI

Usage

Use markdown in the default slot of the callout component to add eye-catching context to your content.

Use the color props to customize it. You can also pass any property from the <NuxtLink> component.

Learn how to install @bitrix24/b24ui-nuxt in your project.
{
  "wait": "Loading client-side content..."
}

Shortcuts

You can also use the note, tip, warning and caution shortcuts with pre-defined icons and colors.

Here's some additional information for you.
Here's a helpful suggestion.
Be careful with this action as it might have unexpected results.
This action cannot be undone.
::note
Here's some additional information.
::

::tip
Here's a helpful suggestion.
::

::warning
Be careful with this action as it might have unexpected results.
::

::caution
This action cannot be undone.
::

API

Props

Prop Default Type
to string | RouteLocationAsRelativeGeneric | RouteLocationAsPathGeneric
  • name?: RouteRecordNameGeneric
  • params?: RouteParamsRawGeneric
  • path?: undefined

    A relative path to the current location. This property should be removed

  • query?: LocationQueryRaw
  • hash?: string
  • force?: boolean

    Triggers the navigation even if the location is the same as the current one. Note this will also add a new entry to the history unless replace: true is passed.

  • state?: HistoryState

    State to save using the History API. This cannot contain any reactive values and some primitives like Symbols are forbidden. More info at https://developer.mozilla.org/en-US/docs/Web/API/History/state

target null | "_blank" | "_parent" | "_self" | "_top" | string & {}
iconIconComponent
iconNameIconComponent
color'air-primary'"air-primary" | "air-primary-success" | "air-primary-alert" | "air-primary-warning" | "air-primary-copilot" | "air-secondary" | "air-secondary-alert" | "air-secondary-accent" | "air-secondary-accent-1" | "air-secondary-accent-2" | "air-secondary-no-accent" | "air-tertiary"
b24ui { base?: ClassNameValue; icon?: ClassNameValue; externalIcon?: ClassNameValue; }

Slots

Slot Type
default{}

Theme

app.config.ts
export default defineAppConfig({
  b24ui: {
    prose: {
      callout: {
        slots: {
          base: 'group relative block py-xs ps-sm pe-xs gap-2 my-5 last:mb-0 text-(length:--ui-font-size-md)/(--ui-font-line-height-3xs) text-(--b24ui-color) bg-(--b24ui-background) border-(--b24ui-border-color) border-(length:--b24ui-border-width) rounded-(--ui-border-radius-md) [&_code]:text-(length:--ui-font-size-sm)/(--ui-font-line-height-sm) [&_code]:bg-(--ui-color-design-filled-black-content) dark:[&_code]:bg-(--ui-color-design-tinted-na-bg) [&_code]:text-(--ui-color-design-filled-black-bg) [&_pre]:bg-(--ui-color-design-filled-black-bg) dark:[&_pre]:bg-(--ui-color-design-tinted-na-bg) [&>div]:my-2.5 [&_ul]:my-2.5 [&_ol]:my-2.5 [&>*]:last:!mb-0 [&_ul]:ps-4.5 [&_ol]:ps-4.5 [&_li]:my-0 transition-colors',
          icon: 'shrink-0 size-5 inline-block me-[6px] text-(--b24ui-icon) transition-colors',
          externalIcon: 'size-4 align-top absolute right-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: 'border-dashed'
          }
        },
        compoundVariants: [
          {
            to: true,
            class: {
              base: 'hover:border-(--b24ui-border-color-hover)',
              externalIcon: 'group-hover:text-(--b24ui-icon)'
            }
          }
        ],
        defaultVariants: {
          color: 'air-primary'
        }
      }
    }
  }
})
vite.config.ts
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import bitrix24UIPluginVite from '@bitrix24/b24ui-nuxt/vite'

export default defineConfig({
  plugins: [
    vue(),
    bitrix24UIPluginVite({
      b24ui: {
        prose: {
          callout: {
            slots: {
              base: 'group relative block py-xs ps-sm pe-xs gap-2 my-5 last:mb-0 text-(length:--ui-font-size-md)/(--ui-font-line-height-3xs) text-(--b24ui-color) bg-(--b24ui-background) border-(--b24ui-border-color) border-(length:--b24ui-border-width) rounded-(--ui-border-radius-md) [&_code]:text-(length:--ui-font-size-sm)/(--ui-font-line-height-sm) [&_code]:bg-(--ui-color-design-filled-black-content) dark:[&_code]:bg-(--ui-color-design-tinted-na-bg) [&_code]:text-(--ui-color-design-filled-black-bg) [&_pre]:bg-(--ui-color-design-filled-black-bg) dark:[&_pre]:bg-(--ui-color-design-tinted-na-bg) [&>div]:my-2.5 [&_ul]:my-2.5 [&_ol]:my-2.5 [&>*]:last:!mb-0 [&_ul]:ps-4.5 [&_ol]:ps-4.5 [&_li]:my-0 transition-colors',
              icon: 'shrink-0 size-5 inline-block me-[6px] text-(--b24ui-icon) transition-colors',
              externalIcon: 'size-4 align-top absolute right-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: 'border-dashed'
              }
            },
            compoundVariants: [
              {
                to: true,
                class: {
                  base: 'hover:border-(--b24ui-border-color-hover)',
                  externalIcon: 'group-hover:text-(--b24ui-icon)'
                }
              }
            ],
            defaultVariants: {
              color: 'air-primary'
            }
          }
        }
      }
    })
  ]
})
Some colors in compoundVariants are omitted for readability. Check out the source code on GitHub.

Badge

Present versioning information, status labels, and relevant tags within your material.

Card

Develop prominent content areas with integrated navigation options.

On this page

  • Usage
  • Shortcuts
  • API
    • Props
    • Slots
  • Theme
Releases
Published under MIT License.

Copyright © 2024-present Bitrix24