Callout
A floating box of content with an arrow pointing at the reference element.
Code
<script lang="ts">
import { Callout } from '@geoffcox/sterling-svelte';
let reference: HTMLElement;
</script>
<div bind:this={reference}>
<!-- TODO: the reference element content -->
</div>
<Callout open {reference}>
<!-- TODO: the callout content -->
</Callout>
Members
| Property Name | Type | Default | Comment |
---|
| conditionalRender | boolean | null | undefined | true |
| crossAxisOffset | number | undefined | 0 |
| mainAxisOffset | number | undefined | 0 |
| open | boolean | null | undefined | false |
| placement | PopoverPlacement | undefined | 'top-start' |
| portalHost | HTMLElement | undefined | undefined |
| reference | HTMLElement | undefined | undefined |
Considerations
- Use Popover for floating content without the Callout style.
- Includes HTMLDivElement props, events, and methods.
Anatomy
portal (<div>)
callout (<div>)
children (Snippet)
arrow (<div>)