import { Meta } from '@storybook/blocks';
import { Canvas } from '@storybook/addon-docs';
import * as PanelStories from './Panel.stories';
import { Hint } from '../../../components';

<Meta title="Components/Panel" />

<Hint>Components</Hint>

# Panel

The panel component is a visible container used on confirmation or results pages to highlight important content.

<Canvas of={PanelStories.primary} />

## When to use this component

Use the panel component to display important information when a transaction has been completed.

In most cases, the panel component is used on <a class="govuk-link" href="https://design-system.service.gov.uk/patterns/confirmation-pages/">confirmation pages</a>, to tell the user they have successfully completed the transaction.

## When not to use this component

Never use the panel component to highlight important information within body content.

### How to write heading text

Keep your heading text brief, as it’s only meant for a high-level explanation of what has happened. For example, ‘Application complete’.

If you can, use shorter words instead of longer ones. Shorter words are less likely to wrap around the panel, which can happen when users on mobile zoom in.

If you need to give detailed information, or more context, use the description text under the heading text.
