Web Analytics

react-native-nitro-text

⭐ 200 stars Korean by patrickkabwe

react-native-nitro-text

iOS 및 Android 모두에서 훨씬 풍부하고 성능이 뛰어난 텍스트 컴포넌트입니다.

https://github.com/user-attachments/assets/57f56b3f-3988-4235-af83-a5f2cfd82121

npm version Discord npm downloads npm downloads mit licence


기능

요구사항

설치

yarn add react-native-nitro-text react-native-nitro-modules

iOS

cd ios && pod install && cd ..

이게 전부입니다. 이제 앱에서 NitroText 컴포넌트를 사용할 수 있습니다.

사용법

import { NitroText as Text } from 'react-native-nitro-text'

export function Title() { return ( 🚀 NitroText Showcase ) }

선택

iOS는 네이티브 선택을 사용합니다. Android에서 NitroText는 현재 React Native Text로 대체됩니다.

import { NitroText as Text } from 'react-native-nitro-text'

export function SelectionExample() { return ( Long-press to select this text. NitroText supports smooth selection, even with inline styles and longer paragraphs. ) }

HTML 렌더링

NitroText는 renderer="html"을 전달할 때 HTML 문자열 자식과 인라인 CSS를 구문 분석할 수 있습니다.

import { NitroText } from 'react-native-nitro-text'

export function HtmlExample() { const html =

Renderer demo

This text comes from HTML with semantic tags.

Inline CSS works too.

return {html} }

사용자 정의 선택 메뉴

NitroText는 텍스트가 선택될 때 나타나는 사용자 정의 메뉴 항목을 지원합니다. titleaction 콜백을 포함하는 메뉴 항목 배열과 함께 menus 속성을 전달하세요.

import { NitroText } from 'react-native-nitro-text'
import { useMemo } from 'react'

export function MenuExample() { const menus = useMemo( () => [ { title: 'Copy', action: () => console.log('Copy action') }, { title: 'Share', action: () => console.log('Share action') }, { title: 'Translate', action: () => console.log('Translate action') }, ], [] )

return ( Select this text to see custom menu options appear in the selection menu. ) }

플랫폼 지원

왜 NitroText인가?

최소한의 JS 오버헤드와 네이티브 iOS 선택 기능을 갖춘 맞춤 네이티브 텍스트 뷰입니다. 스타일이 복잡하거나 중첩된 텍스트 및 대용량 목록에 적합합니다. RN Text 컴포넌트의 드롭인 교체품입니다.

개발

크레딧

create-nitro-module로 부트스트랩됨.

기여

PR 환영합니다! 주요 변경 사항은 먼저 이슈를 열어주세요.

💬 빠른 지원을 위해 Discord 채널에 참여하세요.

--- Tranlated By Open Ai Tx | Last indexed: 2026-05-13 ---