# History.

## What does the pattern do?

- Stores search queries or other preferences of users.

## When should the pattern be used?

- For AI chats.

## Recommendation

- Check how important the feature is for your users and determine whether the search history must always be displayed or can be opened on request.
- The search queries should be interactive so that you can re-enter or delete them right away.

## Examples

- History collapsed
- History open

### History collapsed

 ![Example for a collapsed history ](https://digital.sbb.ch/assets/images/patternlibrary/components/en/pattern_history_closed_light_en.webp "Pattern history collapsed")

### History open

 ![Example for an open history](https://digital.sbb.ch/assets/images/patternlibrary/components/en/pattern_history_open_light_en.webp "Pattern history open")

## Specifications

[Design](https://www.figma.com/design/ASKJJ0RgQNp0TAhXBpLmXd/AI-Patterns-Documentation?node-id=2224-16678)

---

Source: https://digital.sbb.ch/en/design-system/patternlibrary/patterns/history/
