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

<Meta title="Components/Inset text" />

<Hint>Components</Hint>

# Inset text

<Canvas of={InsetTextStories.primary} />

## When to use this component

Use the inset text component to differentiate a block of text from the content that surrounds it, for example:

- quotes
- examples
- additional information about the page

## When not to use this component

Some users do not notice inset text if it’s used on complex pages or near to other visually prominent elements. For this reason, avoid using inset text as a way of highlighting very important information that users need to see.

If you need to draw attention to very important content, like legal information, use the <a href="" class="govuk-link">warning text component</a> instead.


## How it works

Use inset text very sparingly - it’s less effective if it’s overused.
