Tone

The grey second half of a two-tone heading. One per heading.

Clean captures, every time. Ads and cookie banners are removed before the shutter.

Install

$ npx shadcn@latest add @nudgekit/tone

Or with no config: npx shadcn@latest add https://ui.nudgekit.app/r/tone.json

Usage

usage.tsx
import { Tone } from "@/components/ui/tone"

<h1 className="headline text-[52px]">
  The screenshot API for developers. <Tone>Any URL to image, PDF or markdown.</Tone>
</h1>

Do

  • Write a full first sentence, then the Tone phrase.
  • Use it in h1 and h2 headings.

Don't

  • Use two Tones in one heading.
  • Make the Tone lighter than the faint token.

Code

What the CLI writes into your project. It is yours to change.

components/ui/tone.tsx
import * as React from "react";

import { cn } from "@/lib/utils";

/**
 * The grey second half of a two-tone heading:
 * <h1 className="headline">The screenshot API for developers. <Tone>Any URL to image, PDF or markdown.</Tone></h1>
 * At most one Tone per heading, and only after a full first sentence.
 */
function Tone({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>) {
  return <span data-slot="tone" className={cn("text-faint", className)} {...props} />;
}

export { Tone };