@ahiho/react-native-attributed-text
TypeScript icon, indicating that this package has built-in type declarations

1.2.0 • Public • Published

@ahiho/react-native-attributed-text

It's easy to style the nested text in React Native.

Ahiho Attributed Text

Installation

# Yarn
yarn add @ahiho/react-native-attributed-text
# NPM
npm install @ahiho/react-native-attributed-text

Usage

import AttributedText from "@ahiho/react-native-attributed-text";

// ...

<AttributedText
  style={{
    textAlign: 'center',
  }}
  annotationProps={{
    link: {
      style: {
        fontWeight: 'bold',
        color: 'orange',
      },
      onPress: () => {
        console.log('Welcome to Ahiho! Visit https://ahiho.com')
      },
    },
  }}
>
  Welcome to [[link]:[Ahiho!]]
</AttributedText>

Let's check the example for more advance used with i18n translation.

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT

Package Sidebar

Install

npm i @ahiho/react-native-attributed-text

Weekly Downloads

58

Version

1.2.0

License

MIT

Unpacked Size

22.8 kB

Total Files

9

Last publish

Collaborators

  • cody-nguyen
  • meocondangyeu56
  • jwthanh