@atlaskit/page-header — 페이지 헤더
페이지 헤더를 위한 컴포넌트예요. 페이지 제목과 함께 브레드크럼, 동작 버튼, 하단 바를 배치할 때 사용해요.
출처: 문서
본문
PageHeader component
페이지 헤더를 위한 컴포넌트예요.
- 키워드: page, header, title, breadcrumbs, actions
- 카테고리: layout
- 상태: general-availability
예시
import Breadcrumbs from '@atlaskit/breadcrumbs/breadcrumbs';
import { BreadcrumbsItem } from '@atlaskit/breadcrumbs/breadcrumbs-item';
import Button from '@atlaskit/button/default/button';
import PageHeader from '@atlaskit/page-header/page-header';
const Examples = (): React.JSX.Element => (
<>
<PageHeader>Page Title</PageHeader>
<PageHeader
breadcrumbs={
<Breadcrumbs>
<BreadcrumbsItem href="/" text="Home" />
<BreadcrumbsItem href="/projects" text="Projects" />
<BreadcrumbsItem text="Current Project" />
</Breadcrumbs>
}
actions={<Button appearance="primary">Create</Button>}
>
Project Settings
</PageHeader>
<PageHeader
actions={
<>
<Button appearance="subtle">Cancel</Button>
<Button appearance="primary">Save Changes</Button>
</>
}
>
Edit Profile
</PageHeader>
</>
);
export default Examples;
Props
| Prop | Type | Description |
|---|---|---|
actions |
React.ReactElement<any, string | React.JSXElementConstructor<any>> |
Contents of the action bar to be rendered next to the page title |
bottomBar |
React.ReactElement<any, string | React.JSXElementConstructor<any>> |
Contents of the action bar to be rendered next to the page title |
breadcrumbs |
React.ReactElement<any, string | React.JSXElementConstructor<any>> |
Page breadcrumbs to be rendered above the title |
children |
string | number | boolean | React.ReactElement<any, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal |
Contents of the bottom bar to be rendered below the page title |
disableTitleStyles |
boolean |
Content of the page title |
id |
string |
Used as the ID of the inner h1 tag |
innerRef |
(element: HTMLElement) => void |
Returns the inner ref to the DOM element of the title |
truncateTitle |
boolean |
Prevent the title from wrapping across lines |
사용 지침
- 일관된 페이지 헤더 레이아웃에 사용해요
- 내비게이션 맥락을 위해 브레드크럼을 포함해요
- 관련 페이지 동작을 제공해요
- 적절한 헤더 계층을 사용해요
콘텐츠 지침
- 명확하고 설명적인 페이지 제목을 사용해요
- 의미 있는 브레드크럼 라벨을 제공해요
- 동작 중심의 버튼 텍스트를 사용해요
- 헤더 콘텐츠를 집중되게 유지해요
접근성 지침
- 명확한 페이지 제목을 제공해요
- 적절한 제목(heading) 계층을 사용해요
- 브레드크럼 내비게이션에 접근 가능하게 해요
- 명확한 동작 라벨을 제공해요