# Notification bell

> Appears only while someone is asking to join your project, and lets you answer them by film role without leaving the page.

Source: https://kwark.space/designSystem/components/notification-bell

## Usage

### What it is
Kwark has no general notification centre, on purpose: it is a calm, private place (Decision 0001), with no feed of likes or activity. The bell exists for one thing that cannot wait: a person asking to join. It is drawn only while somebody is waiting, and it never pulses or turns red (its CSS says so).

Each request shows who (name, @username, email), what they asked for (*Asked to join Blank Pages as Co-writer*), and three answers: **Let in as Co-writer**, **Decline**, **Open project**. Decline asks once, inline: *Decline Aanya Rao?* **Decline** · **Keep**. Roles are film roles (Decision 0042): Reader, Actor, Co-writer, Director, Producer, Crew, Camera.

### When to use
- Requests that need the owner’s answer: access requests today.

### When not to use
- For comments: someone writing to you puts a dot on the floating dial (Decision 0016, "the only badge").
- For activity, streaks or anything that invites checking in.

### Writing
Count in words: *1 person is asking to join*, *3 people are asking to join*. The approve button names the role it grants.

## Style

### Anatomy

1. **Bubble**: 44px circle, 1px `--k-line`, `--k-surface`, bell 16px.
2. **Count**: 20px pill at the top-right (-4px), `--k-accent` with `--k-on-accent`, 12px.
3. **Panel**: `min(360px, 100vw - 32px)`, at most 72vh, 16px padding, 1px `--k-line`, 10px corners, `--k-surface`.
4. **Request**: 12px padding, 1px `--k-line`, 6px corners, 12px between who and actions.
5. **Who**: avatar 24px, name 14px Poppins 500, two 12px `--k-text-2` lines.

### Tokens

| Token | Light | Dark |
|---|---|---|
| `--k-surface` | #ffffff | #1a1a1a |
| `--k-raise` | #f1f5f9 | #252525 |
| `--k-line` | #e2e8f0 | rgba(255, 255, 255, .1) |
| `--k-text` | #0f172a | #e3e3e3 |
| `--k-text-2` | #5b6779 | #9ca3af |
| `--k-accent` | #98633f | #98633f |
| `--k-on-accent` | #ffffff | #ffffff |
| `--k-danger` | #b4382c | #e0685c |
| `--k-tap` | 44px |  |
| `--k-radius-pill` | 999px |  |
| `--k-radius-card` | 10px |  |
| `--k-radius-control` | 6px |  |
| `--k-fs-body` | 14px |  |
| `--k-fs-meta` | 12px |  |

## Code

### React

In the Kwark app: `import { AccessRequestsBell } from '@/components/sharing/AccessRequestsBell'`.

```tsx
<AccessRequestsBell />  // renders nothing while nobody is waiting
```

| Prop | Type | Notes |
|---|---|---|
| `(none)` | `` | Reads pending requests for projects you own. |

### HTML and CSS

Works anywhere with `kwark.css`.

```html
<div class="kw-bell-demo">
  <button class="kw-bell" type="button" aria-expanded="true" aria-label="1 person asking to join"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M10.3 21a1.9 1.9 0 0 0 3.4 0M3.3 15.3A1 1 0 0 0 4 17h16a1 1 0 0 0 .7-1.7C19.4 14 18 12.6 18 8A6 6 0 0 0 6 8c0 4.6-1.4 6-2.7 7.3"/></svg><em>1</em></button>
  <div class="kw-bell__panel" role="dialog" aria-label="People asking to join">
    <header><strong>1 person is asking to join</strong></header>
    <ul><li>
      <div class="kw-bell__who"><span class="kw-avatar" aria-hidden="true">AR</span><span><strong>Aanya Rao</strong><small>@aanya · aanya@example.com</small><small>Asked to join Blank Pages as Co-writer</small></span></div>
      <div class="kw-bell__acts"><button class="kw-button kw-button--sm kw-button--primary" type="button"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M20 6 9 17l-5-5"/></svg> Let in as Co-writer</button><button class="kw-button kw-button--sm kw-button--quiet" type="button"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M18 6 6 18M6 6l12 12"/></svg> Decline</button><button class="kw-text-button" type="button"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M15 3h6v6M10 14 21 3M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"/></svg> Open project</button></div>
    </li></ul>
  </div>
</div>
```

## Accessibility

### Keyboard
| Key | Does |
|---|---|
| Enter / Space on the bell | Opens the panel. |
| Tab | Moves through each request’s answers. |
| Escape | Closes the panel and returns to the bell. |

### ARIA
- The bell’s name carries the count: *1 person asking to join*. The visible number is decoration.
- The panel is `role="dialog" aria-label="People asking to join"`. Errors appear above the list in `--k-danger` at 12px.

## For agents

### Rules

- **Never** show the bell when nothing is waiting.
- **Never** animate, pulse or colour the bell red.
- **Must** name the film role in the approve button: *Let in as Co-writer*.
- **Must** confirm Decline inline with a Keep option, not a modal.
- **Never** route comments, activity or marketing through the bell.

### AI readiness test

**Task:** Notify a project owner that a crew member viewed the call sheet.

**Give the agent:** This page, Decisions 0001 and 0042.

**Constraint:** The owner has asked to know who has read it.

**A reliable answer:**
- Does not use the bell, which is only for answers that cannot wait
- Shows read state on the call sheet itself (e.g. "Seen by 12 of 18")
- Adds no badge or sound
