Em
Em (강조)
텍스트에서 강조를 나타내기 위해 표시하는 컴포넌트예요. em 요소 기반으로 만들어졌어요.
출처: 문서
본문
강조(stress emphasis)를 나타내기 위해 텍스트를 표시해요.
<Text>
We <Em>had</Em> to do something about it.
</Text>
API Reference
이 컴포넌트는 em 요소를 기반으로 하며 공통 margin props를 지원해요.
| Prop | Type | Default |
|---|---|---|
asChild |
boolean |
No default value |
truncate |
boolean |
No default value |
wrap |
Responsive<"wrap" | "nowrap" | "pretty" | "balance"> |
No default value |
예제 (Examples)
Truncate
truncate prop으로 텍스트가 컨테이너를 넘칠 때 생략 부호(...)로 잘라내요.
<Flex maxWidth="300px">
<Em truncate>
The goal of typography is to relate font size, line height, and line width in a proportional way
that maximizes beauty and makes reading easier and more pleasant.
</Em>
</Flex>
더 알아보기 (Learn more)
- Text 컴포넌트 — 텍스트를 담는 기본 컴포넌트
- Strong 컴포넌트 — 굵게 강조하는 텍스트