---
name: "CanvasContext.strokeText"
mode: "api"
versionRequirements:
  - { name: "Base Library", version: "2.21.8" }
title: "strokeText"
---

## CanvasContext.strokeText

> [VERSION] Base Library >= 2.21.8

### Description

Stroke text at the given (x, y) position

### Parameters

`Params`

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `text` | `string` | Yes | Text to draw |
| `x` | `number` | Yes | x-coordinate of the text's starting point |
| `y` | `number` | Yes | y-coordinate of the text's starting point |

### Return Value

None


### Examples

#### Stroke text

```ts
const ctx = ty.createCanvasContext('myCanvas');
ctx.setFontSize(20);
ctx.strokeText('Hello', 20, 50);
ctx.draw();
```
