Blankslate
Blankslate(빈 상태) 컴포넌트는 콘텐츠가 왜 비어 있는지 사용자에게 설명해 주는 자리 표시자 역할을 합니다. 이 페이지에서는 Blankslate의 기본적인 사용법과 함께, 그래픽·텍스트·액션·테두리 같은 구성 요소별 세부 활용법을 설명합니다.
출처: 문서
본문
Blankslate는 콘텐츠가 왜 없는지 사용자에게 알려 주는 자리 표시자로 쓰입니다.
React 예시
기본 (Default)
Blankslate 컴포넌트의 가장 일반적인 사용법입니다.
<Blankslate>
<Blankslate.Visual>
<BookIcon size="medium" />
</Blankslate.Visual>
<Blankslate.Heading>Welcome to the wiki</Blankslate.Heading>
<Blankslate.Description>
Wikis provide a place in your repository to lay out the roadmap of your project, show the current status, and
document software better, together.
</Blankslate.Description>
<Blankslate.PrimaryAction href="#">Create the first page</Blankslate.PrimaryAction>
</Blankslate>
보조 액션 추가 (With a secondary action)
주요 액션 아래에 보조 텍스트 링크를 붙여 사용자에게 추가 콘텐츠로 안내할 수 있습니다.
<Blankslate>
<Blankslate.Visual>
<BookIcon size="medium" />
</Blankslate.Visual>
<Blankslate.Heading>Welcome to the wiki</Blankslate.Heading>
<Blankslate.Description>
Wikis provide a place in your repository to lay out the roadmap of your project, show the current status, and
document software better, together.
</Blankslate.Description>
<Blankslate.PrimaryAction href="#">Create the first page</Blankslate.PrimaryAction>
<Blankslate.SecondaryAction href="#">Learn more about wikis</Blankslate.SecondaryAction>
</Blankslate>
좁은 변형 (Narrow variant)
좁은 영역에 딱 맞게 여백과 글자 크기를 줄인 변형입니다.
<Blankslate narrow>
<Blankslate.Visual>
<BookIcon size="medium" />
</Blankslate.Visual>
<Blankslate.Heading>Welcome to the wiki</Blankslate.Heading>
<Blankslate.Description>
Wikis provide a place in your repository to lay out the roadmap of your project, show the current status, and
document software better, together.
</Blankslate.Description>
<Blankslate.PrimaryAction href="#">Create the first page</Blankslate.PrimaryAction>
</Blankslate>
여유로운 변형 (Spacious variant)
넓게 여유를 둔 변형입니다.
<Blankslate spacious>
<Blankslate.Visual>
<BookIcon size="medium" />
</Blankslate.Visual>
<Blankslate.Heading>Welcome to the wiki</Blankslate.Heading>
<Blankslate.Description>
Wikis provide a place in your repository to lay out the roadmap of your project, show the current status, and
document software better, together.
</Blankslate.Description>
<Blankslate.PrimaryAction href="#">Create the first page</Blankslate.PrimaryAction>
</Blankslate>
테두리 추가 (With a border)
필요할 때 컴포넌트 구조를 명확히 하기 위해 테두리를 추가합니다.
<Blankslate border>
<Blankslate.Visual>
<BookIcon size="medium" />
</Blankslate.Visual>
<Blankslate.Heading>Welcome to the wiki</Blankslate.Heading>
<Blankslate.Description>
Wikis provide a place in your repository to lay out the roadmap of your project, show the current status, and
document software better, together.
</Blankslate.Description>
<Blankslate.PrimaryAction href="#">Create the first page</Blankslate.PrimaryAction>
</Blankslate>
더 많은 코드 예시 (More code examples)
Blankslate Storybook stories 에서 더 많은 예시를 확인하세요.
Props
Blankslate
| 이름 (Name) | 기본값 (Default) | 설명 (Description) |
|---|---|---|
| border | boolean | 이 컴포넌트 주위에 테두리를 추가합니다 |
| narrow | boolean | 좁은 변형으로 렌더링합니다 |
| spacious | boolean | 여유로운 변형으로 렌더링합니다 |
| className | string | 커스텀 스타일링용 클래스 이름을 지정합니다 |
| size | 'medium' | 'small' | 'medium' | 'large' — 컴포넌트의 크기를 지정합니다 |
Blankslate.Visual
문서화된 props가 없습니다.
Blankslate.Heading
| 이름 (Name) | 기본값 (Default) | 설명 (Description) |
|---|---|---|
| as | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 렌더링할 제목 요소를 지정합니다 |
Blankslate.Description
문서화된 props가 없습니다.
Blankslate.PrimaryAction
| 이름 (Name) | 기본값 (Default) | 설명 (Description) |
|---|---|---|
| href | string | 주요 액션으로 연결되는 링크를 지정합니다. 정의하면 버튼 대신 앵커로 렌더링됩니다 |
Blankslate.SecondaryAction
| 이름 (Name) | 기본값 (Default) | 설명 (Description) |
|---|---|---|
| href | string | 보조 액션으로 연결되는 링크를 지정합니다 |
더 알아보기 (Learn more)
- Blankslate 가이드라인: 컴포넌트의 구조와 카피 작성법을 더 자세히 살펴보세요.
- Blankslate 접근성: 화면 낭독기·키보드 사용자를 위한 접근성 지침을 확인하세요.
- Primer Product 가이드: Primer Product의 다른 컴포넌트와 원칙을 둘러보세요.