force:createRecord example in Salesforce Lightning

Sample Code: CreateAccountComponent.cmp CreateAccountComponentcontroller.js Add the lightning component to any page. I have added it to the Account detail page. Output: