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
Yogesh Malbhage 18Yogesh Malbhage 18 

How to style standard forceChatter:feed component

We are implementing a Community Forum using forceChatter:publisher and forceChatter:feed components. We need to style the forceChatter:feed component according to our design. Please help me by providing the ways to style this standard component.

Original forceChatter:feed design:
User-added image

Desired Design:
User-added image

Please Help me through this ASAP as it is critical.
Raj VakatiRaj Vakati
I dnt think so you can able to do it the  forceChatter:feed .. if you want same styles you need to create a new component with feed objects ...   


 
<div aura:id="feedContainer" class="feed-container">
        <forceChatter:feed />
    </div>

 
Yogesh Malbhage 18Yogesh Malbhage 18
Hi Raj,
Thanks for your quick response. But even after creating new component as mentioned in your answer above how can we style it as desired?
Raj VakatiRaj Vakati
yes .. you can .. 
Yogesh Malbhage 18Yogesh Malbhage 18
Thanks Raj!!

Can you please explain it to me? Are you saying using javascript?
Yogesh Malbhage 18Yogesh Malbhage 18
Can you please provide some code here?
Raj VakatiRaj Vakati
You need to create a custom component markup  with the table and add the styles by using css .. i dnt have similar  code
Yogesh Malbhage 18Yogesh Malbhage 18
We have used same code:
<div aura:id="feedContainer" class="feed-container"> <forceChatter:feed /> </div>
$A.createComponent("forceChatter:feed", {"type": "record", "subjectId" : "0F90n0000004akyCAA"}, function(feed) {
            var feedContainer = component.find("feedContainer");
            feedContainer.set("v.body", feed);
        });
please guide how can I style this?

 
Abhishek MavaniAbhishek Mavani

Hello guys, We can create custom LWC components that look like the forceChatter feed component. Also, it can be customized as per requirements, and you can store the data in the FeedItem object.


Please see the below link more for example:
 

https://medium.com/@abhiForce/custom-feed-component-using-lwc-chatter-in-salesforce-feeditem-object-d2ca3577998 

Thanks!!