UNPKG

@dvcol/neo-svelte

Version:

Neomorphic ui library for svelte 5

9 lines (8 loc) 284 B
export const getNextFocusableElement = (element, targets = [ 'button:not([disabled])', '[href]', 'input:not([disabled])', 'select:not([disabled])', 'textarea:not([disabled])', '[tabindex]:not([tabindex="-1"])', ]) => element?.querySelector(targets.join(','));