@tauri-apps/plugin-nfc
Enumerations
Section titled “Enumerations”NFCTypeNameFormat
Section titled “NFCTypeNameFormat”Source: undefined
Enumeration Members
Section titled “Enumeration Members”AbsoluteURI
Section titled “AbsoluteURI”AbsoluteURI: 3;Source: undefined
Empty: 0;Source: undefined
Media: 2;Source: undefined
NfcExternal
Section titled “NfcExternal”NfcExternal: 4;Source: undefined
NfcWellKnown
Section titled “NfcWellKnown”NfcWellKnown: 1;Source: undefined
Unchanged
Section titled “Unchanged”Unchanged: 6;Source: undefined
Unknown
Section titled “Unknown”Unknown: 5;Source: undefined
TechKind
Section titled “TechKind”Source: undefined
Enumeration Members
Section titled “Enumeration Members”IsoDep
Section titled “IsoDep”IsoDep: 0;Source: undefined
MifareClassic
Section titled “MifareClassic”MifareClassic: 1;Source: undefined
MifareUltralight
Section titled “MifareUltralight”MifareUltralight: 2;Source: undefined
Ndef: 3;Source: undefined
NdefFormatable
Section titled “NdefFormatable”NdefFormatable: 4;Source: undefined
NfcA: 5;Source: undefined
NfcB: 6;Source: undefined
NfcBarcode
Section titled “NfcBarcode”NfcBarcode: 7;Source: undefined
NfcF: 8;Source: undefined
NfcV: 9;Source: undefined
Interfaces
Section titled “Interfaces”NFCRecord
Section titled “NFCRecord”Source: undefined
Properties
Section titled “Properties”| Property | Type | Defined in |
|---|---|---|
format |
NFCTypeNameFormat |
Source: undefined |
id |
number[] |
Source: undefined |
kind |
number[] |
Source: undefined |
payload |
number[] |
Source: undefined |
ScanOptions
Section titled “ScanOptions”Source: undefined
Properties
Section titled “Properties”Source: undefined
Properties
Section titled “Properties”| Property | Type | Defined in |
|---|---|---|
id |
number[] |
Source: undefined |
kind |
string[] |
Source: undefined |
records |
TagRecord[] |
Source: undefined |
TagRecord
Section titled “TagRecord”Source: undefined
Properties
Section titled “Properties”| Property | Type | Defined in |
|---|---|---|
id |
number[] |
Source: undefined |
kind |
number[] |
Source: undefined |
payload |
number[] |
Source: undefined |
tnf |
NFCTypeNameFormat |
Source: undefined |
UriFilter
Section titled “UriFilter”Source: undefined
Properties
Section titled “Properties”| Property | Type | Defined in |
|---|---|---|
host? |
string |
Source: undefined |
pathPrefix? |
string |
Source: undefined |
scheme? |
string |
Source: undefined |
WriteOptions
Section titled “WriteOptions”Source: undefined
Properties
Section titled “Properties”| Property | Type | Description | Defined in |
|---|---|---|---|
kind? |
ScanKind |
- | Source: undefined |
message? |
string |
Message displayed in the UI when reading the tag. iOS only. | Source: undefined |
successfulReadMessage? |
string |
Message displayed in the UI when the tag has been read. iOS only. | Source: undefined |
successMessage? |
string |
Message displayed in the UI when the message has been written. iOS only. | Source: undefined |
Type Aliases
Section titled “Type Aliases”ScanKind
Section titled “ScanKind”type ScanKind = | { mimeType?: string; type: "tag"; uri?: UriFilter;} | { mimeType?: string; techLists?: TechKind[][]; type: "ndef"; uri?: UriFilter;};Source: undefined
Union Members
Section titled “Union Members”Type Literal
Section titled “Type Literal”{ mimeType?: string; type: "tag"; uri?: UriFilter;}Type Literal
Section titled “Type Literal”{ mimeType?: string; techLists?: TechKind[][]; type: "ndef"; uri?: UriFilter;}| Name | Type | Description | Defined in |
|---|---|---|---|
mimeType? |
string |
- | Source: undefined |
techLists? |
TechKind[][] |
Each of the tech-lists is considered independently and the activity is considered a match if any single tech-list matches the tag that was discovered. This provides AND and OR semantics for filtering desired techs. See https://developer.android.com/reference/android/nfc/NfcAdapter#ACTION_TECH_DISCOVERED for more information. Examples import type { TechKind } from "@tauri-apps/plugin-nfc" const techLists = [ // capture anything using NfcF [TechKind.NfcF], // capture all MIFARE Classics with NDEF payloads [TechKind.NfcA, TechKind.MifareClassic, TechKind.Ndef] ] |
Source: undefined |
type |
"ndef" |
- | Source: undefined |
uri? |
UriFilter |
- | Source: undefined |
Variables
Section titled “Variables”RTD_TEXT
Section titled “RTD_TEXT”const RTD_TEXT: number[];Source: undefined
RTD_URI
Section titled “RTD_URI”const RTD_URI: number[];Source: undefined
Functions
Section titled “Functions”isAvailable()
Section titled “isAvailable()”function isAvailable(): Promise<boolean>;Source: undefined
Returns
Section titled “Returns”Promise<boolean>
record()
Section titled “record()”function record( format, kind, id, payload): NFCRecord;Source: undefined
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
format |
NFCTypeNameFormat |
kind |
string | number[] |
id |
string | number[] |
payload |
string | number[] |
Returns
Section titled “Returns”scan()
Section titled “scan()”function scan(kind, options?): Promise<Tag>;Source: undefined
Scans an NFC tag.
import { scan } from "@tauri-apps/plugin-nfc";await scan({ type: "tag" });See https://developer.android.com/develop/connectivity/nfc/nfc#ndef for more information.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
kind |
ScanKind |
- |
options? |
ScanOptions |
- |
Returns
Section titled “Returns”textRecord()
Section titled “textRecord()”function textRecord( text, id?, language?): NFCRecord;Source: undefined
Parameters
Section titled “Parameters”| Parameter | Type | Default value |
|---|---|---|
text |
string |
undefined |
id? |
string | number[] |
undefined |
language? |
string |
'en' |
Returns
Section titled “Returns”uriRecord()
Section titled “uriRecord()”function uriRecord(uri, id?): NFCRecord;Source: undefined
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
uri |
string |
id? |
string | number[] |
Returns
Section titled “Returns”write()
Section titled “write()”function write(records, options?): Promise<void>;Source: undefined
Write to an NFC tag.
import { uriRecord, write } from "@tauri-apps/plugin-nfc";await write([uriRecord("https://tauri.app")], { kind: { type: "ndef" } });If you did not previously call scan with ScanOptions.keepSessionAlive set to true, it will first scan the tag then write to it.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
records |
NFCRecord[] |
- |
options? |
WriteOptions |
- |
Returns
Section titled “Returns”Promise<void>
© 2026 Tauri Contributors. CC-BY / MIT