@logo-elements/message-list
A web component that allows you to show a list of messages, for example, a chat log.
<logo-elements-message-list></logo-elements-message-list>
<script>
document.querySelector('logo-elements-message-list').items = [
{ userName: 'Alice', time: '8 Minutes ago', text: 'Lunch at the usual place?' },
{ userName: 'Bob', time: '6 Minutes ago', text: `Yeah, let's go together.` },
{ userName: 'Alice', time: '2 Minutes ago', text: 'Great! What about you, Charlie?' },
{ userName: 'Charlie', time: 'A few seconds ago', text: 'I will meet you there.' }
];
</script>
Installation
Install the component:
npm i @logo-elements/message-list -s
Once installed, import the component in your application:
import '@logo-elements/message-list';