본문으로 바로가기 본문 바로가기
WIKI 기술 지식 베이스

Inset text

원문 보기 위키 갱신

본문 텍스트 블록을 주변 콘텐츠와 구분할 때 쓰는 컴포넌트예요.

출처: 문서

본문

inset text 컴포넌트는 텍스트 블록을 주변의 콘텐츠와 구분해야 할 때 사용해요. 예를 들어:

  • 인용문
  • 예시
  • 페이지에 대한 추가 정보
<div class="govuk-inset-text">
  It can take up to 8 weeks to register a lasting power of attorney if there are no mistakes in the application.
</div>
{% from "govuk/components/inset-text/macro.njk" import govukInsetText %}

{% call govukInsetText() %}
  It can take up to 8 weeks to register a lasting power of attorney if there are no mistakes in the application.
{% endcall %}

When not to use this component

복잡한 페이지나 시각적으로 두드러지는 다른 요소 근처에서 inset text를 쓰면 어떤 사용자는 알아차리지 못해요. 따라서 사용자가 꼭 봐야 하는 매우 중요한 정보를 강조하는 용도로 inset text를 쓰는 것은 피해야 해요.

법적 정보처럼 매우 중요한 콘텐츠에 주의를 끌어야 한다면, Warning text 컴포넌트를 대신 사용하세요.

How it works

inset text는 아주 드물게 사용하세요. 과하게 쓰면 효과가 떨어져요.

inset text 컴포넌트를 쓰는 방법은 두 가지가 있어요. HTML을 쓰거나, Nunjucks나 GOV.UK Prototype Kit을 쓴다면 Nunjucks 매크로를 사용할 수 있어요.

<div class="govuk-inset-text">
  It can take up to 8 weeks to register a lasting power of attorney if there are no mistakes in the application.
</div>
{% from "govuk/components/inset-text/macro.njk" import govukInsetText %}

{% call govukInsetText() %}
  It can take up to 8 weeks to register a lasting power of attorney if there are no mistakes in the application.
{% endcall %}

더 알아보기 (Learn more)

Recent changes

| Date | Changed | Description | | Aug 2022 | GOV.UK Frontend v4.3.0 | Added the ability to pass the html parameter using Nunjucks call syntax. | | Mar 2019 | GOV.UK Frontend v2.8.0 | Fixed nested components within Inset text being misaligned. | | Jun 2018 | GOV.UK Frontend v1.0.0 | Component introduced. |

Help improve this component

이 페이지가 유용하고, 관련성 있고, 최신 상태로 유지되도록 하려면 다음과 같이 할 수 있어요.

  • GitHub의 'Inset text' 토론에 참여하고 연구를 공유하기
  • GitHub에서 변경 제안하기 – GitHub에서 변경 제안하는 방법에 대해 더 알아보기