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>
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
Name | Description | Reflects | Default |
---|---|---|---|
appearance | The 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
Name | Description |
---|---|
(default) | The callout’s content. |
icon | An informational icon. |
Learn more about using slots.
Parts
Name | Description |
---|---|
base | The component’s base wrapper. |
icon | The callout’s icon. |
message | The 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.
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";