Basic · Display Stable

Highlight

Which words is this comment about, and which words have I just selected?

2 variants × 2 states

The river rose twice that week, and (sample).

The river rose twice that week, and (sample).

The river rose twice that week, and both times the footbridge held (sample).

The river rose twice that week, and both times the footbridge held (sample).

Words
both times the footbridge held (sample)
Thread
Red Fox: Was it really twice? (sample)

Point at the highlighted words: the wash deepens and nothing moves. Tab to a thread's highlight and press Enter to open its thread. The selection variant is the words just selected in comment mode, underlined in ink, before a comment is started.

Used in composites

No composite uses it yet.

Used on screens

Collect feedback from several reviewers

Hand the comments to an agent
See every reviewer's comments on the page

Come back to a page later

Find a thread whose words were cut
Reopen the page with its comments

Comment on any page in Safari

Write the first comment
Copy or save from the toolbar menu

Go through every comment

See every comment in one place
Bring resolved threads back

Manage a thread

Resolve a thread, and bring it back

Review a document

The clipboard is blocked
Copy every comment as Markdown
Drop a pin on an exact spot
Comment on a few wordsselection

Review on a phone

See every comment full width

Say who you are

Add your name
Prompt to build this component

When to use it

When to use

  • On the words a thread is about: a soft wash of the spot colour behind them, which is itself what people hover and click to open the thread.
  • On words a reviewer has just selected in comment mode (the selection variant), while the comment icon waits beside the paragraph.

When not to use

  • To emphasise words in the author's text: Pipeup never restyles the page.
  • On a whole block or a spot: a block gets the naming bar's outline, a spot gets cmp-pin.
Variants, anatomy, accessibility, interaction and content rules

Variants

  • default — a soft wash of the spot colour behind the words of a thread; hovering deepens it. The base class alone, no modifier class.
  • selection — the words a reviewer has just selected: an ink underline on a violet tint, so the selection reads as pending rather than commented.

Anatomy

  • Root: <span class="ds-highlight"> around the words, inside the author's own element; for a thread it is a <button class="ds-highlight" type="button"> so it can be opened. Add ds-highlight--selection for a pending selection.
  • Nothing else: no icon, no count. The comment icon beside a selection is a separate cmp-icon-button placed by the screen.

Accessibility

  • A thread's highlight is a button named "Comment by <writer>: <first words>", opened with Enter or Space; Esc closes the thread it opened.
  • The wash keeps the author's text colour, so the words stay as readable as before (the pair text-default on status-warning-surface is declared).
  • The selection variant adds an underline, so it is not told apart by colour alone.

Interaction

  • Hover deepens the wash over --ds-motion-quick on --ds-motion-ease (int-01); nothing moves (int-03).
  • Hovering a thread's highlight also gives it one slow, soft pulse together with its card, so the two are seen as one.
  • Focus shows the shared ring (int-02).
  • A highlight that replaces a selection fades in over --ds-motion-settle (data-ds-arriving for one frame).

Content rules

  • The highlight wraps exactly the selected words, never a whole paragraph by convenience.

Do and don't

  • Do keep the wash light enough that the words read as the author set them.
  • Don't change the font, size or colour of the words inside.