- Implementation
- DrillDown Props
- DrillDown.Header Props
- DrillDown.Content Props
- useDrillDown hook
Common Examples
Use as children of Dialog, Drawer, or Page.Panel
Any number of DrillDown components can be added as children of the Dialog, Drawer, or Page.Panel component. When a DrillDown is visible, it will cover the entire contents of the Dialog or Drawer.Each
DrillDown requires a unique indexDrillDown sibling components are identified by their index prop. Numbers used for the index prop are zero-based, and calling next or clicking the DrillDown.NextButton will display the next index in numerical order.Uncontrolled usage
Using DrillDown.NextButton and DrillDown.PrevButton
The DrillDown can be used with uncontrolled state by using the DrillDown.NextButton to move forward to each DrillDown index in ascending numerical order. The DrillDown.PrevButton will similarly move backward in descending numerical order, and will close the DrillDown if the current visible DrillDown is index 0.Controlled usage
Using the useDrillDown hook
The useDrillDown hook returns a next and back function to allow for programmatically navigating between DrillDown components in numerical index order. (The hook also returns a setIndex function to allow navigating to arbitrary index values.)To allow this hook to work, the drillDownProps return value also needs to be spread onto the parent component.Closing from within a DrillDown
By default, the DrillDown.Header does not display a close button. To display a close button in the DrillDown.Header, add an onClose handler to the DrillDown.