The dynamics of a city's structures are determined by the coupling of functional components (such as restaurants) and human population. Yet, there lacks mechanism models to quantify the forces on the spatial distribution of the components. Here, a gradient model is explored to simulate the individual density curves of multiple types of city functional components based on the equilibria of gravitational and repulsive forces along with the urban-rural gradient. The model is concise by relying on four key variables, the attributes of components include net ecosystem service (m) and environmental index (𝜸); and the attributes of cities include land rent exponent (𝝈) and population attenuation coefficient (𝜷). The model has been used to simulate the distribution curves of 22 types of components on the urban-rural gradients in 13 cities in two periods. The model reveals a bottom-up mechanism that the patterns of the components in a city are determined by the economic, ecological, and social attributes of both cities and components. Strongly backed by empirical data, the model can predict the distribution curves of many types of components along with the development of cities. This model provides a general tool for analyzing the distribution of multiple objects on the gradients.