A performance-based framework is presented that explicitly incorporates functionality-based building limit states in the assessment of community resilience to earthquakes. These limit states are defined based on their implications to post-earthquake functionality and recovery. They include damage triggering inspection, occupiable damage with loss of functionality, unoccupiable damage, irreparable damage and collapse. Fragility curves are developed linking earthquake ground motion intensity to the probability of exceedance for each of the limit states. A characteristic recovery path is defined for each limit state based on distinct functional states, the time spent within each state and the level of functionality associated with each state. A building recovery function is computed accounting for the uncertainty in the occurrence of each recovery path and its associated limit state. The outcome is a probabilistic assessment of recovery of functionality at the building level for a given ground motion intensity. The effects of externalities and other socio-economic factors on building-level recovery and ways to incorporate these in the framework are discussed. A case study is presented to demonstrate application of the proposed framework to model the post-earthquake shelter-in-place housing capacity of an inventory of residential buildings. This type of assessment can inform planning and policy decisions to manage the earthquake risk to residential housing capacity of communities.