Skip to content

docs(website): use Ark hotkeys and clipboard, drop unused hooks - #4382

Merged
Adebesin-Cell merged 1 commit into
chakra-ui:v6from
Adebesin-Cell:docs/website-ark-utilities
Dec 2, 2026
Merged

Adebesin-Cell merged 1 commit into
chakra-ui:v6from
Adebesin-Cell:docs/website-ark-utilities

Conversation

@Adebesin-Cell

Copy link
Copy Markdown
Collaborator

📝 Description

Swaps two more hand-rolled bits of the docs site for Ark utilities, and removes dead code.

Depends on #4381. This branch is stacked on it (it removes the last user of use-hooks.ts), so the diff includes #4381's commit until that merges.

⛳️ Current behavior

  • The search shortcut is a custom keydown listener plus an isMac check for the "⌘K / Ctrl K" label.
  • The code-block copy button uses navigator.clipboard, useState and a setTimeout to swap its icon.
  • IFrameExample and use-hooks.ts are no longer used anywhere.

🚀 New behavior

  • ⌘K / Ctrl+K uses useHotkey, and the label uses useFormatHotkey, from @ark-ui/react/hotkeys. It still opens search from inside form fields, since modifier combos are enabled there by default.
  • The copy button is Clipboard.Root, Clipboard.Trigger and Clipboard.Indicator, keeping the 1s check icon.
  • IFrameExample and use-hooks.ts are deleted.

🧩 Frameworks

  • React
  • Solid
  • Svelte
  • Vue
  • Not framework-specific

💣 Is this a breaking change (Yes/No):

No. Website only, so no changeset.

✅ Checklist

  • Added a changeset for user-facing changes
  • Added or updated tests
  • Added an example for any new prop or part
  • Updated the docs

📝 Additional information

Two small visible differences from Ark's defaults:

  • The Mac label reads ⌘ K (with a space) instead of ⌘K.
  • The server renders Ctrl K, and Mac visitors see it switch to ⌘ K after hydration. The old code defaulted to Mac, so Windows visitors saw the switch instead.

@vercel

vercel Bot commented Dec 2, 2026

Copy link
Copy Markdown

@Adebesin-Cell is attempting to deploy a commit to the Chakra UI Team on Vercel.

A member of the Team first needs to authorize it.

@Adebesin-Cell
Adebesin-Cell force-pushed the docs/website-ark-utilities branch from 921f842 to 0cf0a78 Compare December 2, 2026 09:50
@Adebesin-Cell
Adebesin-Cell merged commit 467b667 into chakra-ui:v6 Dec 2, 2026
9 of 10 checks passed
@Adebesin-Cell
Adebesin-Cell deleted the docs/website-ark-utilities branch December 2, 2026 09:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant