Skip to main content

CommonFlair

@devvit/public-api v0.13.10-dev


Type Alias: CommonFlair

CommonFlair = object

This type is used for both the link and author flairs on Post and Comment objects.

Properties

backgroundColor?

optional backgroundColor: string

Flair background color as a hex color string (# prefixed) or transparent

Example

"#FF4500"

cssClass?

optional cssClass: string

Custom CSS classes from the subreddit's stylesheet to apply to the flair if rendered as HTML


richtext

richtext: object[]

RichText object representation of the flair

elementType?

optional elementType: string

Enum of element types. e.g. emoji or text

emojiRef?

optional emojiRef: string

Emoji references, e.g. "🌈"

text?

optional text: string

Text to show up in the flair, e.g. "Need Advice"

url?

optional url: string

url string, e.g. "https://reddit.com/"


templateId?

optional templateId: string

Flair template ID to use when rendering this flair


text?

optional text: string

Plain text representation of the flair


textColor?

optional textColor: string

One of: "light", "dark"


type?

optional type: string

One of: "text", "richtext"