Please see below a Plan and Profile view of a rain garden, which possesses full infiltration and bioretention functions. in the plan view note that the contributing area has water coming from both the building's roof, and paved areas, along with the driveway located in the lowest area of the property allowing the feature to collect and to easily absorb rain and surface water into the ground. The installation also includes a pretreatment rock/concrete forebay to limit erosion and reduce higher velocity flows, along with mulch, filter media and various planting zones with specific vegetation types that are best suited for these areas within the feature.
Drawings are from the https://www.cityofvancouver.us/publicworks/page/surface-waterstormwater-design-construction-requirements City of Vancouver's Surface Water/Stormwater Design & Construction Requirements] document. For further details about these cross section drawings please visit the link.