부품 가게·기관 정보

메뉴판 menu-board

종이 메뉴판처럼 묶음별 품목을 두 단으로 적는다. 이름과 가격을 점선으로 잇고, 아래에 원어 이름·짧은 설명·강조 한 줄, 이름 옆에 '품절'·'토·일만' 같은 작은 표식. 오른쪽 단에 사진을 세울 수 있다.

설치

shadcn/ui 를 쓰는 Next.js 프로젝트에서 한 줄로 설치됩니다. 파일은 components/bpublish/menu-board.tsx 로 들어오고, 공통 토큰(base)도 같이 설치됩니다. 테마는 테마에서 하나 고릅니다.

npx shadcn@latest add https://www.bpublish.com/r/menu-board.json

레지스트리를 등록했다면 npx shadcn@latest add @bpublish/menu-board · 설치 안내

AI에게 맡기기

Claude Code, Cursor 같은 AI 코딩 도구에 붙여 넣으세요. MCP 서버를 연결해 두면 이름만 말해도 됩니다.

bpublish UI의 메뉴판(menu-board) 부품으로 만들어 줘. 설치: npx shadcn@latest add https://www.bpublish.com/r/menu-board.json · 문서: https://www.bpublish.com/designs/components/menu-board

사용 예시

app/page.tsx
import { MenuBoard } from '@/components/bpublish/menu-board'
import { SectionHead } from '@/components/bpublish/section-head'

const groups = [
  {
    title: '사워도우',
    en: 'Sourdough',
    items: [
      { name: '밀담 시골빵', en: 'Pain de campagne', price: '8,500원', desc: '앉은뱅이밀과 통밀을 섞어 48시간 숙성한 대표 빵입니다. 껍질이 두껍고 속이 촉촉합니다.', note: '반 덩이 4,500원' },
      { name: '호밀 사워도우', en: 'Seigle', price: '6,500원', desc: '호밀 30%에 캐러웨이 씨를 넣어 산미가 또렷합니다. 얇게 썰어 버터와 함께 드십시오.' },
      { name: '무화과 호두 사워도우', en: 'Figue & noix', price: '7,800원', desc: '반건조 무화과와 구운 호두를 반죽 무게의 절반만큼 넣었습니다.' },
      { name: '올리브 치아바타', en: 'Ciabatta aux olives', price: '5,800원', desc: '물을 많이 머금은 반죽에 블랙 올리브와 로즈메리를 넣었습니다.' },
    ],
  },
  {
    title: '바게트와 작은 빵',
    en: 'Baguette & petit pain',
    items: [
      { name: '전통 바게트', en: 'Baguette tradition', price: '4,200원', desc: '하루 두 번 굽습니다. 껍질이 가장 바삭한 때는 나온 뒤 한 시간 안입니다.' },
      { name: '발효 버터 크루아상', en: 'Croissant', price: '4,300원', desc: '사흘에 걸쳐 버터를 접어 넣은 반죽으로 결이 스물일곱 겹입니다.' },
      { name: '앙버터 바게트', en: 'Anko & beurre', price: '5,500원', desc: '직접 쑨 팥앙금과 무염 버터를 바게트 반 개에 넉넉히 넣었습니다.' },
      { name: '쌀 식빵', en: 'Pain de mie au riz', price: '6,000원', desc: '경기 이천 쌀가루를 섞어 속이 쫀득합니다. 주말에만 굽습니다.', marks: ['토·일만'] },
    ],
  },
  {
    title: '구움과자',
    en: 'Baked sweets',
    items: [
      { name: '태운 버터 휘낭시에', en: 'Financier', price: '2,800원', desc: '버터를 갈색이 날 때까지 끓여 고소함을 끌어올렸습니다.' },
      { name: '카눌레', en: 'Canelé', price: '3,200원', desc: '하루 숙성한 반죽을 구리 틀에 구워 겉은 단단하고 속은 부드럽습니다.', soldOut: true },
      { name: '쑥 스콘', en: 'Scone à l’armoise', price: '3,800원', desc: '강화 쑥 가루와 생크림으로 만든 스콘입니다. 클로티드 크림을 곁들입니다.' },
      { name: '흑임자 파운드', en: 'Quatre-quarts sésame noir', price: '3,500원', desc: '볶은 흑임자를 곱게 갈아 넣은 파운드 케이크 한 조각입니다.' },
    ],
  },
  {
    title: '마실 것',
    en: 'Drinks',
    items: [
      { name: '아메리카노', en: 'Americano', price: '4,500원', desc: '망원동 로스터리의 미디엄 로스트 원두를 씁니다.' },
      { name: '카페라테', en: 'Café latte', price: '5,000원', desc: '목장 우유를 데워 진하게 만듭니다.' },
      { name: '볶은 보리차', en: 'Barley tea', price: '3,000원', desc: '따뜻하게만 냅니다. 빵 한 덩이를 사시면 한 잔을 드립니다.' },
      { name: '생강 레몬차', en: 'Ginger & lemon', price: '5,500원', desc: '매장에서 직접 담근 생강청으로 끓입니다.' },
    ],
  },
]

export default function Example() {
  return (
    <section className="shell py-16 md:py-24">
      <SectionHead eyebrow="Today’s Bread" title="오늘의 빵" description="메뉴는 계절과 밀의 상태에 따라 조금씩 바뀝니다. 아래는 11월에 굽는 빵과 과자입니다." />
      <MenuBoard
        className="mt-12 lg:mt-16"
        edition="2026년 11월 메뉴판"
        groups={groups}
        footnote="모든 빵에 국산 밀가루, 프랑스산 게랑드 소금, 발효 버터를 씁니다. 알레르기 성분은 매장 진열대 이름표에 적어 두었습니다."
        photos={[
          { src: '/images/crumb.webp', alt: '반으로 자른 시골빵의 불규칙한 기공과 윤기 나는 속살', caption: '밀담 시골빵의 속' },
          { src: '/images/pastry.webp', alt: '나무 쟁반에 담긴 휘낭시에와 카눌레, 쑥 스콘', caption: '오전 11시 30분의 구움과자' },
        ]}
      />
    </section>
  )
}

속성

이름형식기본값설명
groups필수{ title: string; en?: string; items: MenuBoardItem[] }[]—묶음. 품목은 { name, price, en?, desc?, note?, marks?: string[], soldOut?: boolean }
editionstring—메뉴판 맨 위 한 줄 ('2026년 11월 메뉴판')
footnotestring—맨 아래 안내 (원재료, 알레르기 등)
photos{ src: string; alt: string; caption?: string }[]—오른쪽 세로 단 사진. 두 장이 보기 좋다
soldOutLabelstring'품절'품절 표식 글자

원본 코드

설치 명령 없이 그대로 복사해 넣어도 됩니다. React 외의 패키지는 쓰지 않습니다.

components/bpublish/menu-board.tsx
/**
 * bpublish UI — 메뉴판. https://www.bpublish.com/designs/components/menu-board
 * 종이 메뉴판처럼 묶음별 품목을 적는다. 이름과 가격을 점선으로 잇고, 아래에 영문 이름과 짧은 설명, '품절'·'오늘만' 같은 작은 표식.
 */
export type MenuBoardItem = {
  name: string
  price: string
  /** 이름 아래 작은 기울임 글자 (원어 이름 등) */
  en?: string
  desc?: string
  /** 설명 아래 강조색 한 줄 (반 덩이 가격, 판매 요일 등) */
  note?: string
  /** 이름 옆 작은 표식 ('오늘만', '토·일만' 등) */
  marks?: string[]
  /** 품절이면 이름 옆에 품절 표식을 달고 흐리게 */
  soldOut?: boolean
}

export type MenuBoardGroup = { title: string; en?: string; items: MenuBoardItem[] }

export type MenuBoardProps = {
  groups: MenuBoardGroup[]
  /** 메뉴판 맨 위 한 줄 ('2026년 11월 메뉴판') */
  edition?: string
  /** 맨 아래 안내 (원재료, 알레르기 등) */
  footnote?: string
  /** 오른쪽 세로 단의 사진 (두 장이 보기 좋다) */
  photos?: { src: string; alt: string; caption?: string }[]
  soldOutLabel?: string
  className?: string
}

function Mark({ children, strong = false }: { children: string; strong?: boolean }) {
  return (
    <span
      className={`font-body inline-flex shrink-0 items-center rounded-sm border px-1.5 py-px text-[11px] leading-[1.4] font-semibold tracking-[0.02em] ${
        strong ? 'border-primary text-primary' : 'border-muted-foreground/50 text-muted-foreground'
      }`}
    >
      {children}
    </span>
  )
}

export function MenuBoard({ groups, edition, footnote, photos = [], soldOutLabel = '품절', className = '' }: MenuBoardProps) {
  return (
    <div className={`grid gap-14 ${photos.length ? 'lg:grid-cols-[minmax(0,1fr)_320px] lg:gap-16' : ''} ${className}`}>
      <div>
        {edition ? (
          <p className="mb-8 flex items-center gap-4 text-[13px] font-medium tracking-[0.06em] text-muted-foreground">
            <span aria-hidden className="h-px w-8 bg-foreground/40" />
            {edition}
          </p>
        ) : null}

        <div className="grid gap-x-14 gap-y-14 md:grid-cols-2">
          {groups.map((g) => (
            <section key={g.title} aria-label={g.title}>
              <div className="flex items-baseline justify-between gap-4 border-b-[1.5px] border-foreground pb-3">
                <h3 className="heading text-[23px]">{g.title}</h3>
                {g.en ? <span className="text-right text-[11px] font-semibold tracking-[0.2em] text-muted-foreground uppercase max-sm:hidden">{g.en}</span> : null}
              </div>
              <ul>
                {g.items.map((it) => (
                  <li key={it.name} className={`pt-5 ${it.soldOut ? 'opacity-55' : ''}`}>
                    <div className="flex items-baseline gap-3">
                      <h4 className="heading flex flex-wrap items-baseline gap-x-2 gap-y-1 text-[18px] leading-snug">
                        <span className={it.soldOut ? 'line-through decoration-1' : ''}>{it.name}</span>
                        {it.soldOut ? <Mark>{soldOutLabel}</Mark> : null}
                        {it.marks?.map((m) => (
                          <Mark key={m} strong={!it.soldOut}>
                            {m}
                          </Mark>
                        ))}
                      </h4>
                      <span aria-hidden className="min-w-6 flex-1 -translate-y-[0.3em] border-b-[1.5px] border-dotted border-foreground/45" />
                      <span className="heading shrink-0 text-[17px] tabular-nums">{it.price}</span>
                    </div>
                    {it.en ? <p className="mt-0.5 text-[12px] tracking-[0.02em] text-muted-foreground italic">{it.en}</p> : null}
                    {it.desc ? <p className="mt-1.5 text-[14.5px] leading-[1.7] text-muted-foreground">{it.desc}</p> : null}
                    {it.note ? <p className="mt-1.5 text-[13px] font-semibold text-primary">{it.note}</p> : null}
                  </li>
                ))}
              </ul>
            </section>
          ))}
        </div>

        {footnote ? <p className="mt-14 border-t border-foreground/25 pt-5 text-[13.5px] leading-[1.75] text-muted-foreground">{footnote}</p> : null}
      </div>

      {photos.length ? (
        <div className={`grid grid-cols-2 gap-4 lg:grid-cols-1 lg:content-start lg:gap-8 ${edition ? 'lg:pt-[52px]' : ''}`}>
          {photos.map((p) => (
            <figure key={p.src}>
              <div className="aspect-[4/5] overflow-hidden bg-muted">
                <img src={p.src} alt={p.alt} loading="lazy" className="h-full w-full object-cover" />
              </div>
              {p.caption ? <figcaption className="mt-2.5 text-[13px] text-muted-foreground">{p.caption}</figcaption> : null}
            </figure>
          ))}
        </div>
      ) : null}
    </div>
  )
}