Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

React Native Bullet Character? or Unicode?

I want to use Bullet Character/ Small Circles used for passwords in React Native Text component. Is there a way to create them without using package.

enter image description here

I am thinking of creating a rounded View with background filled. However, kindly let know if a simpler solution exists.

like image 819
Rusty Avatar asked Apr 01 '19 04:04

Rusty


People also ask

How do you use bullets in React Native?

React Native does not provide <ol> and <ul> like tags which auto handle bullet and counts now we have to handle both <ol> and <ul> in React Native FlatList. For <ol> , we can easily show using index value but for <ul> we have to use some Unicode to handle it.

What is ${} In react?

the ${} is the syntax for variables (or other code to be executed) inside template literals (`).

How do I create a list in React Native?

React Practice Course. To create a list, we will use the map() method. This will iterate over an array of items, and render each one. When we run the app, we will see the list of names. You can click on each item in the list to trigger an alert with the name.


2 Answers

There is a much simpler way,

Try using Unicode.

2B24, 25CF, 26AB, etc... these are Unicode for black filled dots.

USAGE: <Text>{'\u2B24'}</Text>.

You can search more Unicode here, http://www.unicode.org/

like image 114
Jaydeep Galani Avatar answered Sep 22 '22 13:09

Jaydeep Galani


If you're wanting to create a TextInput that obscures the entries (e.g. for a password input), TextInput has a secureTextEntry prop.

like image 26
Thijs Avatar answered Sep 22 '22 13:09

Thijs