Skip to content

@gtkx/react / TextTagProps

Type Alias: TextTagProps

TextTagProps = object

Defined in: packages/react/src/jsx.ts:197

Props for the TextTag virtual element.

Used to declaratively define and apply text formatting to content within a TextBuffer.

Example

tsx
<GtkTextView>
    <x.TextBuffer>
        Hello <x.TextTag id="bold" weight={Pango.Weight.BOLD}>bold</x.TextTag> world
    </x.TextBuffer>
</GtkTextView>

Properties

accumulativeMargin?

optional accumulativeMargin?: boolean

Defined in: packages/react/src/jsx.ts:267

Whether margins accumulate


allowBreaks?

optional allowBreaks?: boolean

Defined in: packages/react/src/jsx.ts:261

Whether breaks are allowed


background?

optional background?: string

Defined in: packages/react/src/jsx.ts:203

Background color as a string (e.g., "red", "#ff0000")


backgroundFullHeight?

optional backgroundFullHeight?: boolean

Defined in: packages/react/src/jsx.ts:205

Whether the background fills the entire line height


children?

optional children?: ReactNode

Defined in: packages/react/src/jsx.ts:279

Text content and nested TextTag children


direction?

optional direction?: Gtk.TextDirection

Defined in: packages/react/src/jsx.ts:253

Text direction


editable?

optional editable?: boolean

Defined in: packages/react/src/jsx.ts:257

Whether the text can be modified


fallback?

optional fallback?: boolean

Defined in: packages/react/src/jsx.ts:265

Whether font fallback is enabled


family?

optional family?: string

Defined in: packages/react/src/jsx.ts:209

Font family name (e.g., "Sans", "Monospace")


font?

optional font?: string

Defined in: packages/react/src/jsx.ts:211

Font description string (e.g., "Sans Italic 12")


fontFeatures?

optional fontFeatures?: string

Defined in: packages/react/src/jsx.ts:275

OpenType font features as a string


foreground?

optional foreground?: string

Defined in: packages/react/src/jsx.ts:207

Foreground (text) color as a string


id

id: string

Defined in: packages/react/src/jsx.ts:199

Unique identifier for this tag in the tag table


indent?

optional indent?: number

Defined in: packages/react/src/jsx.ts:243

Paragraph indent in pixels (negative = hanging)


insertHyphens?

optional insertHyphens?: boolean

Defined in: packages/react/src/jsx.ts:263

Whether to insert hyphens at breaks


invisible?

optional invisible?: boolean

Defined in: packages/react/src/jsx.ts:259

Whether the text is invisible/hidden


justification?

optional justification?: Gtk.Justification

Defined in: packages/react/src/jsx.ts:251

Text justification


language?

optional language?: string

Defined in: packages/react/src/jsx.ts:277

Language code (e.g., "en-US")


leftMargin?

optional leftMargin?: number

Defined in: packages/react/src/jsx.ts:239

Left margin in pixels


letterSpacing?

optional letterSpacing?: number

Defined in: packages/react/src/jsx.ts:235

Extra spacing between characters in Pango units


lineHeight?

optional lineHeight?: number

Defined in: packages/react/src/jsx.ts:237

Factor to scale line height by


overline?

optional overline?: Pango.Overline

Defined in: packages/react/src/jsx.ts:231

Overline style (use Pango.Overline constants)


paragraphBackground?

optional paragraphBackground?: string

Defined in: packages/react/src/jsx.ts:269

Paragraph background color as a string


pixelsAboveLines?

optional pixelsAboveLines?: number

Defined in: packages/react/src/jsx.ts:245

Pixels of blank space above paragraphs


pixelsBelowLines?

optional pixelsBelowLines?: number

Defined in: packages/react/src/jsx.ts:247

Pixels of blank space below paragraphs


pixelsInsideWrap?

optional pixelsInsideWrap?: number

Defined in: packages/react/src/jsx.ts:249

Pixels of blank space between wrapped lines


priority?

optional priority?: number

Defined in: packages/react/src/jsx.ts:201

Priority of this tag (higher wins when multiple tags affect same property)


rightMargin?

optional rightMargin?: number

Defined in: packages/react/src/jsx.ts:241

Right margin in pixels


rise?

optional rise?: number

Defined in: packages/react/src/jsx.ts:233

Offset of text above baseline in Pango units (negative = below)


scale?

optional scale?: number

Defined in: packages/react/src/jsx.ts:217

Font size scale factor relative to default


showSpaces?

optional showSpaces?: Pango.ShowFlags

Defined in: packages/react/src/jsx.ts:271

How to render invisible characters


size?

optional size?: number

Defined in: packages/react/src/jsx.ts:215

Font size in Pango units


sizePoints?

optional sizePoints?: number

Defined in: packages/react/src/jsx.ts:213

Font size in points


stretch?

optional stretch?: Pango.Stretch

Defined in: packages/react/src/jsx.ts:223

Font stretch (use Pango.Stretch constants)


strikethrough?

optional strikethrough?: boolean

Defined in: packages/react/src/jsx.ts:227

Whether to strike through the text


style?

optional style?: Pango.Style

Defined in: packages/react/src/jsx.ts:221

Font style (use Pango.Style constants)


textTransform?

optional textTransform?: Pango.TextTransform

Defined in: packages/react/src/jsx.ts:273

How to transform text for display


underline?

optional underline?: Pango.Underline

Defined in: packages/react/src/jsx.ts:229

Underline style (use Pango.Underline constants)


variant?

optional variant?: Pango.Variant

Defined in: packages/react/src/jsx.ts:225

Font variant (use Pango.Variant constants)


weight?

optional weight?: Pango.Weight | number

Defined in: packages/react/src/jsx.ts:219

Font weight (use Pango.Weight constants)


wrapMode?

optional wrapMode?: Gtk.WrapMode

Defined in: packages/react/src/jsx.ts:255

Wrap mode for line breaks