시작하기
설치
bpublish UI 는 shadcn/ui 레지스트리로 배포됩니다. 패키지를 설치하는 방식이 아니라, 원본 코드가 내 프로젝트의 components/bpublish/ 로 복사되어 들어옵니다. 들어온 뒤에는 내 코드이니 마음대로 고칩니다.
1. 프로젝트 준비
Next.js(App Router)와 Tailwind CSS v4 프로젝트에 shadcn/ui 를 초기화합니다. 이미 shadcn 을 쓰고 있다면 건너뜁니다.
npx create-next-app@latest my-site
cd my-site
npx shadcn@latest init2. 테마 하나
색·글꼴·모서리를 정합니다. app/globals.css 의 변수가 바뀌고 글꼴이 레이아웃에 더해집니다. 테마는 테마에서 고릅니다.
npx shadcn@latest add https://www.bpublish.com/r/theme-onyu.json3. 필요한 부품
여러 개를 한 번에 적어도 됩니다. 공통 토큰(base)과 함께 쓰는 부품은 저절로 따라옵니다.
npx shadcn@latest add https://www.bpublish.com/r/site-header.json https://www.bpublish.com/r/business-hours.json https://www.bpublish.com/r/site-footer.jsonimport { SiteHeader } from '@/components/bpublish/site-header'
import { BusinessHours } from '@/components/bpublish/business-hours'
import { SiteFooter } from '@/components/bpublish/site-footer'이름으로 설치하기
components.json 에 레지스트리를 한 번 등록하면 주소 대신 @bpublish/이름 으로 설치하고, npx shadcn@latest search @bpublish 로 찾아볼 수 있습니다.
{
"registries": {
"@bpublish": "https://www.bpublish.com/r/{name}.json"
}
}npx shadcn@latest add @bpublish/theme-onyu @bpublish/site-header @bpublish/business-hoursshadcn 없이
Tailwind CSS v4 프로젝트라면 부품 페이지의 「원본 코드」를 components/bpublish/ 에 붙여 넣고, 아래 CSS 를 globals.css 에 더한 뒤 테마 페이지의 CSS 변수를 붙여 넣으면 같습니다. shadcn 의 기본 색 이름(--background, --primary …)도 테마에 함께 들어 있습니다.
@theme inline {
--color-inverse: var(--inverse, var(--foreground));
--color-inverse-foreground: var(--inverse-foreground, var(--background));
--color-inverse-muted: var(--inverse-muted, var(--muted-foreground));
--color-inverse-border: var(--inverse-border, var(--border));
--color-success: var(--success, var(--foreground));
--color-success-foreground: var(--success-foreground, var(--background));
--color-warning: var(--warning, var(--foreground));
--color-warning-foreground: var(--warning-foreground, var(--background));
--font-heading: var(--heading-font, inherit);
--font-body: var(--body-font, inherit);
}
@utility shell {
width: 100%;
max-width: 80rem;
margin-inline: auto;
padding-inline: 1.25rem;
@media (width >= 48rem) {
padding-inline: 2.5rem;
}
}
@utility heading {
font-family: var(--heading-font, inherit);
font-weight: var(--heading-weight, 700);
letter-spacing: var(--heading-tracking, -0.02em);
word-break: keep-all;
}
@layer base {
body {
font-family: var(--body-font, inherit);
word-break: keep-all;
overflow-wrap: break-word;
}
}레지스트리 주소
- 항목 하나:
https://www.bpublish.com/r/{name}.json - 전체 목록: https://www.bpublish.com/r/registry.json
- AI 용 전체 문서: https://www.bpublish.com/designs/bpublish-ui.md