# Understand Custom Routers

> What a Custom Router's shared context tracks, how Auto Take Mode and Control Mode shape its behavior, and how nesting works.

A Custom Router is the context for a routing panel you build yourself, button by button, rather than a panel Buttons generates for you. This page explains what that context tracks and the choices that shape how it behaves, before you build one. See Build a Router Section if you want a ready-made panel generated from a set of routing resources instead, that's a different element with a similar name. What the context holds A Custom Router's context tracks the state every button placed inside it shares: the currently selected source, selected destination, active levels, active tally channels, and, at runtime, a selected project or routing preset. Because this state is shared, a source button, a destination button, and a Take button placed anywhere inside the same Custom Router all act on the same in-progress selection. Every button that should act on a router must be placed inside that Custom Router's boundary: directly, or nested inside a popover, folder section, or shared section that is itself mounted inside the Custom Router in the final layout. A button pressed outside any Custom Router context fails and shows a brief error indicator rather than doing nothing, so a misplaced button is noticeable rather than silently broken. How a selection becomes a route The Auto Take Mode setting decides how many selections it takes before Buttons actually routes: Auto Take Mode What happens Off (Require Take Button) Selecting a source and a destination only stages them. Nothing routes until a Take button is pressed. Source then Destination Selecting a source only stages it. Routing happens as soon as a destination is selected afterward. Destination then Source Selecting a destination only stages it. Routing happens as soon as a source is selected afterward. Either Source or Destination (Complete Selection) Routing happens the moment both a source and a destination are selected, in either order. Off (Require Take Button) matches the staged-then-confirm pattern used in the Route view and Router Section , so it's a reasonable default if you want a consistent feel across your routing surfaces. The other modes trade that confirmation step for fewer presses. Who can change the selection Each side of the router (source and destination) has its own Control Mode , so one side can behave differently from the other: Control Mode What it means Editable Internal actions inside this Custom Router can change this selection. This is the default. Locked This side is fixed to a configured endpoint. Internal selection actions cannot change it. Parent Variable This side follows a routing endpoint variable on the parent section: an enclosing element supplies the value. Position Variable This side follows a routing endpoint variable on the current position, so more than one section can share or react to the same value. Levels and tally channels have their own, simpler control mode with only Editable and Locked : there's no variable-driven option for those. Which state the router shows Route State Source controls which underlying state the router's buttons treat as the current source or destination when showing selection, contributing sources, and tally: the same Live , Request , and Virtual distinction covered in Understand route status , applied here to feed a Custom Router's own buttons instead of the Route Status view. The options are listed Virtual , Request , Live , matching the link-type picker in Routing → Route . The default, Auto (Virtual → Request → Live) , prefers a virtual link, falls back to a persisted request, then the physical live state: the same order Routing → Route uses to resolve Auto. Levels and tally channels A Custom Router's Levels setting (Video, Audio, Data) restricts which member ports of a multi-port bundle participate when a bundle-level source or destination is taken: it doesn't introduce a separate routing concept, it filters the same ports the rest of Buttons already knows about. Tally channel selection reuses the same tally channel system used elsewhere in Buttons: the router's Red and Green Tally Channel settings choose which channels count as each color for buttons inside it, so those buttons can react to the same tally state your Tally configuration produces. Nesting and using more than one Custom Router A Custom Router works well together with other sections. You can place folders, popovers and shared sections inside a Custom Router to organize its buttons, and you can place a Custom Router inside a Folder Section, for example one router per folder page. Don't put a Custom Router inside another Custom Router: it has no benefit. A position can also have more than one independent Custom Router side by side, for example, one scoped to video routing and a separate one for audio routing. Each keeps its own selection, levels, tally, and project state completely separate from the others, so building more than one on the same position is a supported way to keep unrelated routing tasks from interfering with each other. Where to go next Build a focused routing panel with Custom Router with a Take button and source and destination controls. Custom Router button types , for every button type you can place in a Custom Router. Choose how to build a routing panel , for a full comparison. Build a Router Section , for a generated panel instead.
