This component represents a user comment with support for customizable details such as the author's name, avatar, and optional time information. It includes a structured layout with an avatar, header, and message body, allowing additional content to be provided via a slot. Styles can adjust its appearance, such as flipping or differentiating received comments.
Decimus arma tametsi approbo suppono eligendi taceo ullus. Aqua vesper copiose capto atavus deleniti comminor.
Bas Milius
Sapiente dedico demoror cruciamentum canto bos repudiandae vox. Amicitia at theca auctor thesaurus. Adnuo nam trepide trado curiositas comedo conturbo agnitio.
Required icons
user
Props
avatar-alt?: string A brief description of the image that is shown.
avatar-fallback?: "colored" | "neutral" How the fallback to initials should look.
avatar-fallback-icon?: FluxIconName The icon that is used within the fallback.
avatar-fallback-initials?: string The initials that are used for the fallback.
avatar-url?: string The url to the image source that is used in the avatar.
is-flipped?: boolean Flip the comment.
is-received?: boolean Use a received appearance.
name: string The name of the comment's author.
period?: string The period when the comment was created.
An incoming comment that is used within a message thread.
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Distinctio ducimus earum sed tenetur. Amet at dicta explicabo facere, fuga id itaque nisi quam quisquam tempore. Alias asperiores ea odio perspiciatis?
System
<template> <FluxComment avatar-fallback="neutral" avatar-fallback-icon="gear" posted-by="System" :posted-on="postedOn" is-received> Lorem ipsum dolor sit amet, consectetur adipisicing elit. Distinctio ducimus earum sed tenetur. Amet at dicta explicabo facere, fuga id itaque nisi quam quisquam tempore. Alias asperiores ea odio perspiciatis? </FluxComment></template><script lang="ts" setup> import { FluxComment } from '@flux-ui/components'; import { DateTime } from 'luxon'; const postedOn = DateTime.now().minus({seconds: 45});</script>
Outgoing
An outgoing comment that is used within a message thread.
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Distinctio ducimus earum sed tenetur. Amet at dicta explicabo facere, fuga id itaque nisi quam quisquam tempore. Alias asperiores ea odio perspiciatis?
<template> <FluxComment avatar-fallback-icon="user" posted-by="You" :posted-on="postedOn"> Lorem ipsum dolor sit amet, consectetur adipisicing elit. Distinctio ducimus earum sed tenetur. Amet at dicta explicabo facere, fuga id itaque nisi quam quisquam tempore. Alias asperiores ea odio perspiciatis? </FluxComment></template><script lang="ts" setup> import { FluxComment } from '@flux-ui/components'; import { DateTime } from 'luxon'; const postedOn = DateTime.now();</script>
Comment
This component represents a user comment with support for customizable details such as the author's name, avatar, and optional time information. It includes a structured layout with an avatar, header, and message body, allowing additional content to be provided via a slot. Styles can adjust its appearance, such as flipping or differentiating received comments.
Required icons
Props
avatar-alt?: stringA brief description of the image that is shown.
avatar-fallback?: "colored" | "neutral"How the fallback to initials should look.
avatar-fallback-icon?: FluxIconNameThe icon that is used within the fallback.
avatar-fallback-initials?: stringThe initials that are used for the fallback.
avatar-url?: stringThe url to the image source that is used in the avatar.
is-flipped?: booleanFlip the comment.
is-received?: booleanUse a received appearance.
name: stringThe name of the comment's author.
period?: stringThe period when the comment was created.
Slots
defaultThe contents of the comment.
Examples
Incoming
An incoming comment that is used within a message thread.
Outgoing
An outgoing comment that is used within a message thread.
Typing
An indication that someone is typing a message.
Used components