Skip to content

feat(focus): add createFocusGroup - #1004

Open
jer3m01 wants to merge 2 commits into
solidjs-community:nextfrom
jer3m01:feat/focus
Open

feat(focus): add createFocusGroup#1004
jer3m01 wants to merge 2 commits into
solidjs-community:nextfrom
jer3m01:feat/focus

Conversation

@jer3m01

@jer3m01 jer3m01 commented Aug 9, 2026

Copy link
Copy Markdown
Member

Ports FocusManager from Kobalte to focus.

Also handles keyboard navigation within the focus group.

import { createFocusGroup } from "@solid-primitives/focus";

const [ref, setRef] = createSignal<HTMLElement>();

// Keyboard navigation is attached to the ref automatically.
createFocusGroup(ref);

return (
  <div ref={setRef} role="menu">
    <button role="menuitem">One</button>
    <button role="menuitem">Two</button>
    <button role="menuitem">Three</button>
  </div>
);

@changeset-bot

changeset-bot Bot commented Aug 9, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 3238a1a

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@solid-primitives/focus Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coderabbitai

coderabbitai Bot commented Aug 9, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 0431a5d5-1258-4af8-9ecb-0cdd284d36f4

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@jer3m01 jer3m01 changed the title feat(focus): add focusGroup feat(focus): add createFocusGroup Aug 9, 2026
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