Skip to main content Design tokens Components Style utilities
Skip to table of contents

    Callout

    Callouts are used to display important messages inline.

    <pc-callout>
      <pc-icon
          library="default"
          icon-style="solid"
          name="circle-info"
          slot="icon"
      ></pc-icon>
      This is a standard callout. You can customise its content and even the icon.
    </pc-callout>
    Code

    Demos

    Appearances

    Set the appearance attribute to change the callout’s appearance.

    Without icons

    Icons are optional. Simply omit the icon slot if you don’t want them.

    Properties

    NameDescriptionReflectsDefault
    appearanceThe callout’s appearance. "primary" | "success" | "neutral" | "warning" | "danger""primary"
    updateComplete A read‐only promise that resolves when the component has finished updating. -

    Learn more about attributes and properties.

    Slots

    NameDescription
    (default)The callout’s content.
    iconAn informational icon.

    Learn more about using slots.

    Parts

    NameDescription
    baseThe component’s base wrapper.
    iconThe callout’s icon.
    messageThe callout’s content.

    Learn more about customising CSS parts.

    Importing

    If you’re using the autoloader or the standard loader, you can ignore this section. If you’re cherry picking, you can use any of the following snippets to import this component.

    ScriptImportBundler

    To import this component from the CDN with a script tag, copy this snippet and paste it in your HTML.

    <script type="module" src="https://cdn.jsdelivr.net/npm/placer-toolkit@0.5.1/dist/components/callout/callout.js"></script>

    To import this component from the CDN using a JavaScript import, copy this snippet and paste it in your JavaScript:

    import "https://cdn.jsdelivr.net/npm/placer-toolkit@0.5.1/dist/components/callout/callout.js";

    To import this component with a bundler using a JavaScript import, copy this snippet and paste it in your JavaScript:

    import "placer-toolkit/dist/components/callout/callout.js";