# Business profile

A place or a person, ready to act on: actions up front, open status worked out from the hours, local time for people, details to copy.

> chatcn Pro: needs a Pro license (https://chatcn.dev/pro). Install from the `@chatcn-pro` registry with your license token; setup at https://chatcn.dev/docs/chatcn-pro.

Example: Business profile. A coffee bar with its open status worked out from its hours in Kyoto time. Open Hours for the week. Preview: https://chatcn.dev/preview/business-profile-demo

## Installation

```bash
npx shadcn@latest add @chatcn-pro/business-profile
```

## Usage

```tsx
import { BusinessProfile } from "@/components/ui/chatcn/pro/business-profile"

<BusinessProfile
  name="Kissa Fumi"
  subtitle="Coffee bar · Nakagyo"
  cover="/places/kissa-fumi.webp"
  rating={4.7}
  reviewCount={1284}
  hours={[{ day: 1, open: "08:00", close: "18:00" }, …]}
  timeZone="Asia/Tokyo"
  actions={[
    { label: "Directions", icon: <NavigationIcon />, primary: true, onClick: route },
    { label: "Call", icon: <PhoneIcon />, href: "tel:+81755550123" },
  ]}
  details={[{ label: "Address", value: "Sanjo Ohashi Higashi 2-14, Kyoto", copy: true }]}
/>
```

Up to four actions sit in a row like a maps place card, with the one most people want filled. For a place, `hours` and `timeZone` work out whether it is open right now in its own zone and say it in words and color: green Open until the closing time, amber Closes soon within the last hour, red Closed with when it opens next, naming the day when it isn't today. Hours fold open to the week with today marked. With `kind="person"` the photo turns round and the facts start with their local time and how far ahead or behind you it is. Facts, rating and status share one row whose dot separators never start a wrapped line. `now` fixes the clock for demos and tests.

## Examples

### States

Example: States. A person with their local time, a place closing within the hour, and one closed for the day. Preview: https://chatcn.dev/preview/business-profile-states

## Props

| Prop | Type | Notes |
| --- | --- | --- |
| `kind` | `"company" | "person"` | Default company |
| `name`, `subtitle`, `image`, `cover`, `verified` |  | Who or what |
| `rating`, `reviewCount`, `facts` |  | The quiet row of facts |
| `actions` | `ProfileAction[]` | `{ label, icon, href?, onClick?, primary? }`, up to four |
| `details` | `ProfileDetail[]` | `{ label, value, href?, copy? }` |
| `hours`, `timeZone` | `ProfileHours[]`, `string` | `{ day, open, close }`, 0 is Sunday |
| `now`, `locale` |  | Clock and formatting |
| `labels` | `Partial<BusinessProfileLabels>` | Every string, for translation |

## Keyboard

| Key | Action |
| --- | --- |
| Tab | Through the actions, links, copy buttons and Hours |

## Accessibility

- Open status is in words as well as color; verified has its own label.
- Hours are a disclosure over a table with day headers.

## Motion

Actions press in with scale; the hours rise in. Reduced motion keeps them still.

Source: https://chatcn.dev/docs/components/business-profile