Skip to main content

Live Component Playground

Common Examples

import { Overflow } from "@servicetitan/anvil2";

function ExampleComponent() {
  return (
    <Overflow truncate height="5rem">
      {/* Overflow Content */}
    </Overflow>
  );
}

Overflow any elements

By default, the Overflow component creates a vertically scrolling area with a shadow to indicate which directions it can be scrolled.

Horizontal overflow

To apply the overflow effect horizontally, add direction="row" to the Overflow component:

Overflow truncation

To display a “Show more…” button, you can add the truncate prop. For more custom use cases, truncate can also accept an object to specify custom expand/collapse display text and custom event handlers.
Last modified on January 23, 2026