Footer
브랜드, 링크 그룹, 메타 정보를 담은 사이트 푸터입니다. 문서 푸터가 이 컴포넌트를 씁니다.
가져오기
섹션 제목: “가져오기”import { Footer, FooterBrand, FooterBrandName, FooterBrandDescription, FooterNav, FooterGroup, FooterGroupLabel, FooterLink, FooterMeta, FooterCopyright,} from "@pelagornis/page/components";위 미리보기는 이 파일을 렌더링한 것입니다. src/components/에 복사해서 시작하세요.
import { Footer, FooterBrand, FooterBrandDescription, FooterBrandName, FooterCopyright, FooterGroup, FooterGroupLabel, FooterLink, FooterMeta, FooterNav,} from "@pelagornis/page/components";
export default function FooterDemo() { return ( <Footer className="w-full"> <FooterBrand> <FooterBrandName>Page</FooterBrandName> <FooterBrandDescription>A Starlight theme built on RefineUI.</FooterBrandDescription> </FooterBrand> <FooterNav> <FooterGroup> <FooterGroupLabel>Docs</FooterGroupLabel> <FooterLink href="/guides/getting-started/">Getting started</FooterLink> <FooterLink href="/components/">Components</FooterLink> </FooterGroup> <FooterGroup> <FooterGroupLabel>Project</FooterGroupLabel> <FooterLink href="https://github.com/pelagornis/starlight-theme-page">GitHub</FooterLink> </FooterGroup> </FooterNav> <FooterMeta> <FooterCopyright>© Pelagornis</FooterCopyright> </FooterMeta> </Footer> );}MDX에서 사용
섹션 제목: “MDX에서 사용”Footer 컴포넌트는 React 상태를 공유하는 여러 부분으로 이루어집니다. MDX에 적은 자식은 각각 별도의 아일랜드로 렌더링되어 부분끼리 서로 닿지 않습니다. 위 예제처럼 .tsx 파일에서 조합한 뒤 그 파일을 가져오세요.
---title: Example---
import FooterExample from "../../components/FooterExample";
<FooterExample client:load />client:load는 페이지를 불러올 때 아일랜드를 하이드레이션합니다. 페이지 아래쪽에 있는 콘텐츠에는 client:visible을 쓰세요.
Markdoc에서 사용
섹션 제목: “Markdoc에서 사용”Markdoc 태그는 Astro 컴포넌트를 렌더링하는데, 이 컴포넌트는 클라이언트 상태가 필요합니다. 예제를 하이드레이션하는 .astro 파일로 감싼 뒤, 그 파일을 태그로 등록하세요.
---import FooterExample from "../FooterExample";---
<FooterExample client:load />import { component, defineMarkdocConfig } from "@astrojs/markdoc/config";import starlightMarkdoc from "@astrojs/starlight-markdoc";import pageMarkdoc from "@pelagornis/page/markdoc";
export default defineMarkdocConfig({ extends: [starlightMarkdoc(), pageMarkdoc()], tags: { "footer-example": { render: component("./src/components/markdoc/FooterExample.astro"), selfClosing: true, }, },});{% footer-example /%}컴포넌트를 이루는 부분과 각 부분이 렌더링하는 data-refineui 역할입니다.
| 부분 | 역할 |
|---|---|
root | footer |
brand | footer-brand |
brand_description | footer-brand-description |
brand_name | footer-brand-name |
copyright | footer-copyright |
explore | footer-explore |
group | footer-group |
group_label | footer-group-label |
link | footer-link |
locale | footer-locale |
logo | footer-logo |
meta | footer-meta |
meta_end | footer-meta-end |
nav | footer-nav |
social | footer-social |
컴포넌트가 스타일을 적용하는 상태입니다. 컴포넌트 상태는 data 속성으로 드러납니다.
| 종류 | 상태 |
|---|---|
| 의사 클래스 | focus-visible |
- 디자인 가이드와 토큰 상세는 RefineUI · Footer를 참고하세요.
- 공통 규칙은 MDX에서 사용과 Markdoc에서 사용을 참고하세요.