跳转到主要内容

RtkIcon

Renders an SVG icon from an icon string, applying the current theme text color.

Properties

Property Type Required Default Description
icon string ✅ - SVG icon string to render

Usage Examples

Basic Usage

import { RtkIcon } from "@cloudflare/realtimekit-react-native-ui";

function MyComponent() {
	return <RtkIcon icon={svgIconString} />;
}

With Properties

import {
	RtkIcon,
	defaultIconPack,
} from "@cloudflare/realtimekit-react-native-ui";

function MyComponent() {
	return <RtkIcon icon={defaultIconPack.mic_on} />;
}