# tui/cycle-focus Cycle widget focus to the next/previous `Focusable` widget in `tab-index` order. The framework's default action when nothing consumes a Tab keypress. ## Syntax
[tui/cycle-focus direction tree]
## Parameters - `direction` — `:forward` (Tab) or `:back` (Shift+Tab) - `tree` — the widget tree to search for Focusable widgets ## Examples
[tui/cycle-focus :forward $widget-state]
[tui/cycle-focus :back $widget-state]
## Returns `true` if focus moved, `false` otherwise. ## See Also `tui/focus-widget`, `tui/focused-widget-id`, `tui/clear-focus`