function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Niraj Singh 28Niraj Singh 28 

difference between lightning and ui tags

Hi folk,

I am new in lightning application developer and here i have seen that we can achive same design using lightning tas as well as using ui tags then what is difference here.

Please read my complete post.
 
Khan AnasKhan Anas (Salesforce Developers) 
Hi Niraj,

Greetings to you!

The original components that were made available when the Lightning Component Framework first came out live in the ui namespace (<ui:button>, <ui:inputText>, etc).

The new and improved components, also known as the Base Lightning Components, live in the lightning namespace (<lightning:button>, <lightning:input>, etc).

According to Salesforce:

You can find base Lightning components in the lightning namespace to complement the existing ui namespace components. In instances where there are matching ui and lightning namespace components, we recommend that you use the lightning namespace component. The lightning namespace components are optimized for common use cases. Beyond being equipped with the Lightning Design System styling, they handle accessibility, real-time interaction, and enhanced error messages.

A lightning tag has inbuilt SLDS we do not need to put extra effort to improve the look and feel, also it has may awesome tags to handle the Error or bad inputs.  

So, whenever possible, use the Base Lightning Components (components in the lightning namespace).

Reference: https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/lightning_overview.htm

I hope it helps you.

Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.

Thanks and Regards,
Khan Anas
Raj VakatiRaj Vakati
You can find base Lightning components in the lightning namespace to complement the existing ui namespace components. In instances where there are matching ui and lightning namespace components, we recommend that you use the lightning namespace component. The lightning namespace components are optimized for common use cases. Beyond being equipped with the Lightning Design System styling, they handle accessibility, real-time interaction, and enhanced error messages.

In subsequent releases, we intend to provide additional base Lightning components. We expect that in time the lightningnamespace will have parity with the ui namespace and go beyond it. In addition, the base Lightning components will evolve with the Lightning Design System over time. This ensures that your customizations continue to match Lightning Experience and the Salesforce app.

While the base components are visual building blocks and provides minimum functionality out-of-the-box, they can be combined together to build “experience components” with richer capabilities and made accessible via the Lightning App Builder. Admins can drag-and-drop these experience components to build and configure user interfaces easily. For example, the Chatter Feed component in Lightning App Builder comprises a collection of tabs, a group of buttons, and a rich text editor.

The API version column denotes the minimum API version you must set to use the component in the Developer Console, the Force.com IDE, or via API. Components that don’t specify a minimum API version are usable with any API version 37.0 and later.


https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/lightning_overview.htm