 title="Permanent link">&para;</a></h3>
<p>Use the addText method to create a new text field.</p>
<pre><code class="language-TypeScript">import { spfi } from &quot;@pnp/sp&quot;;
import { IFieldAddResult, FieldTypes } from &quot;@pnp/sp/fields/types&quot;;
import &quot;@pnp/sp/webs&quot;;
import &quot;@pnp/sp/lists&quot;;
import &quot;@pnp/sp/fields&quot;;

const sp = spfi(...);

// create a new text field called 'My Field' in web.
const field: IFieldAddResult = await sp.web.fields.addText(&quot;My Field&qu