Toggle Tip

A popover-style tip that toggles on click, used for providing additional context.

Anatomy

<script>
  import { ToggleTip, InfoTip } from "@saas-ui/svelte/components/toggle-tip";
</script>

<ToggleTip content="Additional information">
  <button>Click me</button>
</ToggleTip>

<!-- Or use InfoTip for a preset info icon trigger -->
<InfoTip>Helpful information here</InfoTip>

Examples

Basic Accessibility

Basic toggle tip with icon trigger.

Custom Content Accessibility

Use the children slot for custom content.

Info Tip Accessibility

Use InfoTip for a convenient info icon toggle tip.

Positioning Accessibility

Use the placement prop to control the position.

Sizes Accessibility

Use the size prop to change the size of the toggle tip.

Props

Prop Type Default Description
content text - The content of the toggle tip.
size xs | sm | md | lg sm The size of the toggle tip.
placement top | bottom | left | right top The placement of the toggle tip.
class text - CSS class to apply to the component.