components / Structure

Collapsible

Default

Animate

Collapsible can be configured to open and close with a transition effect. This is useful when the area being open is not large or a performance hit on slower computers.

Examples

Basic

Accordion

A variation where only one or no section in a list of collapsible sections is open at a time.

When to collapse content

In general, content should not be collapsed by default, as it can hide important information and require additional interactions to access it. Some use general use cases of collapsed content include:

  • When the content has secondary value on the page, such as viewing details on a single item.
  • When space is cramped, particularly on smaller displays.
  • When information is not yet relevant, such as in a Flow Card.
  • When using, the preferred control for the component is a Button variation.

Importing

import { Collapsible } from '@servicetitan/design-system';