Tidy 5e Sheets API
    Preparing search index...

    Type Alias CustomTraitEntry

    type CustomTraitEntry = {
        content?: string;
        cssClass?: ClassValue;
        icons?: { icon: string; label: string }[];
        label: string;
        onClick?: (params: CustomTraitOnClickParams) => void;
        parenthetical?: string;
        sign?: string;
        units?: string;
        unitsKey?: string;
        value?: string;
    }
    Index

    Properties

    content?: string

    Custom HTML content, to appear to the right of any specified icons and before any other content. This content is specifically rendered as HTML, unlike the more specific building blocks.

    cssClass?: ClassValue

    Optional classes to apply to the resulting trait UI element. Any clsx value is permissible.

    ['your-classes', 'canBeListed', { ['in-a-variety']: true, ['of-ways']: false}]
    
    'your-classes canBeListed in-a-variety of-ways'
    
    icons?: { icon: string; label: string }[]

    Icons associated with the trait.

    label: string

    Text that describes the trait.

    onClick?: (params: CustomTraitOnClickParams) => void

    An optional handler for when the pill is clicked. If a function is provided, then the pill will render as an interactive HTML element such as an anchor or a button. Parameters:

    • app - the sheet instance.
    • document - the relevant Foundry document.
    • context - the Tidy prepared context data. Use as your own risk.
    parenthetical?: string

    Any information that should appear in parentheses after the main trait context info.

    sign?: string

    The number sign (+ or -) for a numeric trait.

    units?: string

    The localized units abbreviation.

    unitsKey?: string

    The units key for CONFIG.DND5E purposes.

    value?: string

    A value associated with the trait.