Callout

Component used to grab user attention and communicate an important message, that does not require interaction from user.

Callout title
This is the content of the callout.

This is the content of the callout. No title.

MDC
::callout{icon}
#title
Callout title

#content
This is the content of the callout.
::

::callout{icon}
This is the content of the callout. No title.
::

Types

Callout has such contextual types: success, info, warning, and danger. It also has additional neutral, primary, secondary types.

Primary callout title
This is the content of the callout.
This is the content of the callout.
Neutral callout title
This is the content of the callout.
This is the content of the callout.
This is the content of the callout.
This is the content of the callout.
This is the content of the callout.
MDC
::callout{type="primary" icon}
#title
Primary callout title

#content
This is the content of the callout.
::

::callout{type="secondary" icon}
#title
Secondary callout title

#content
This is the content of the callout.
::

::callout{type="neutral" icon}
#title
Neutral callout title

#content
This is the content of the callout.
::

::callout{type="info" icon}
#title
Callout title

#content
This is the content of the callout.
::

::callout{type="success" icon}
#title
Success callout title

#content
This is the content of the callout.
::

::callout{type="warning" icon}
#title
Warning callout title

#content
This is the content of the callout.
::

::callout{type="danger" icon}
#title
Danger callout title

#content
This is the content of the callout.
::

Icon

Callout could have an icon, which is displayed on the left side. By default, it is the pre-selected icon that corresponds to the type prop, but it could be overridden using icon prop. Any component name prefixed with Icon, icon name from Iconify or any emoji could be used.

Callout title
This is the content of the callout. No icon.
๐Ÿค“
Fun fact
This is the content of the callout. With emoji.
Danger callout title
This is the content of the callout with custom icon.
MDC
::callout{type="success"}
#title
Callout title

#content
This is the content of the callout. No icon.
::

::callout{type="info" icon="๐Ÿค“"}
#title
Fun fact

#content
This is the content of the callout. With emoji.
::

::callout{type="danger" icon="ion:skull"}
#title
Danger callout title

#content
This is the content of the callout with custom icon.
::

Props

NameTypeDefaultDescription
typeStringneutralContextual state of Alert. Affects colors. Possible values are: success, info, warning, danger, primary, secondary, and neutral
iconString, BooleanfalseIcon to be displayed on the left side of the Callout. Any component name prefixed with Icon, icon name from Iconify or any emoji could be used.

Slots

NameDescription
defaultThe content of the callout. Used as a fallback for content slot, when user don't need a title
titleThe title of the callout.
contentThe content of the callout.

Design Tokens

tokens.config.ts
import { defineTheme } from 'pinceau'

export default defineTheme({
  elements: {
    callout: {
      width: '100%',
      paddingX: '{space.4}', 
      paddingY: '{space.4}', 
      borderWidth: '1px', 
      borderStyle: 'solid', 
      borderRadius: '{elements.radii.base}',
      boxShadow: 'inset 0.25px 0.5px 0px hsla(0,0%,100%,.1), inset -0.25px 0px 0px hsla(0,0%,100%,.1)',
      icon: {
        width: '{space.6}', 
        height: '{space.7}', 
        marginInlineEnd: '{space.3}', 
        fontSize: '{text.xl.fontSize}', 
        lineHeight: '{text.xl.lineHeight}', 
      },
      title: {
        fontSize: '{text.xl.fontSize}', 
        lineHeight: '{text.xl.lineHeight}', 
        fontWeight: '{fontWeight.medium}', 
        marginBottom: '{space.1}', 
      },
    },
  }
})