<script>
  import { TooltipDefinition } from "carbon-components-svelte";
  import Preview from "../../components/Preview.svelte";
</script>

### Default

<TooltipDefinition tooltipText="IBM Corporate Headquarters is based in Armonk, New York.">
  Armonk
</TooltipDefinition>

### Custom tooltip direction and alignment

Customize the tooltip menu direction and alignment through the `direction` and `align` props.

By default, `direction` is `"bottom"` and `align` is `"center"`.

<TooltipDefinition direction="top" align="start" tooltipText="IBM Corporate Headquarters is based in Armonk, New York.">
  Armonk
</TooltipDefinition>

### Custom tooltip slot

<TooltipDefinition>
  Armonk
  <span slot="tooltip" style="color: red">
    IBM Corporate Headquarters is based in Armonk, New York.
  </span>
</TooltipDefinition>
