The embodiment of the invention discloses a user interface component generation method and device. The method comprises the steps that a component library is uploaded, and components in the componentlibrary is called, wherein the component library comprises a search box, a data and time selector, a tree component, a pop-up box, image polygon hot area drawing and the like; when one component is called from the component library, the component is displayed on a display interface, a view layer of the component monitors a page attribute set event requested to be executed by a developer, and the event is fed back to a logical layer of the component, so that data of the logical layer is modified according to the page attribute set event. Due to the fact that document identification of page elements of the view layers of the components and document identification of the data processed by the logical layers are bound, the view layers only need to render the data in the logical layers of the to-be-called components in the view layers of the components according to the document identification, that is to say, custom adjustment on the components can be completed, the operator does not need to operate document object models one by one, operation is easy, and the efficiency is high.