DEV Community

Alex
Alex

Posted on

Question: How to style data in Firebase

Hello!! So right now, a user's input is sent to the database and gets displayed on a refresh. What I want to do is give users the option to bold their text and have Firebase display the bolded text.

I was thinking of using a checkbox (If checked then bold the text) But how can I get Firebase to do that? Is there a way to style data in Firebase or style the output?

Top comments (2)

Collapse
 
uddeshjain profile image
Uddesh

One way to do that is you can store users choice in firebase like

isBold: true or false.

So when you display the data just put a condition like if isBold is true then display bold otherwise display normal text.

Collapse
 
supremerumham profile image
Alex

okay thank you!!