![PyPI Now Supports iOS and Android Wheels for Mobile Python Development](https://cdn.sanity.io/images/cgdhsj6q/production/96416c872705517a6a65ad9646ce3e7caef623a0-1024x1024.webp?w=400&fit=max&auto=format)
Security News
PyPI Now Supports iOS and Android Wheels for Mobile Python Development
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
@jsamr/react-native-li
Advanced tools
A pure JavaScript React Native component to render CSS3 compliant ordered and unordered lists.
A pure-JavaScript React Native component to render CSS3 compliant ordered and unordered lists.
Supports more than 4 dozens numeric, alphabetic, symbolic and additive presets, including
Arabic (numeric), Persian, Thai, Hebrew, Roman, Katana, Latin, disk, circle, square...
All presets can be easily extended (add prefix, suffix).
Plus, it has premium RTL support 🚀
npm add --save @jsamr/react-native-li @jsamr/counter-style
yarn add @jsamr/react-native-li @jsamr/counter-style
You must provide a counter style renderer from @jsamr/counter-style
library
to the counterRenderer
prop of MarkedList
component. This library exports
dozens of presets as individual modules (see examples below) and also provides
an easy API to create custom counter styles. Check the docs
here.
MarkedList
will render every children as a list item (li). If you want to
render items in a different container, you should instead use MarkedListItem
in
combination with useMarkedList
. The latter takes exactly the same props as MarkedListItem
+ a length
prop corresponding to the number of list items to render. It returns base props for the MarkedListItem
component.
The full API including components props is available here.
import React from 'react';
import { ScrollView, StyleSheet, Text } from 'react-native';
import lowerLatin from '@jsamr/counter-style/presets/lowerLatin';
import MarkedList from '@jsamr/react-native-li';
export default function App() {
return (
<ScrollView style={{ flexGrow: 1 }}>
<MarkedList counterRenderer={lowerLatin}>
{[...Array(100).keys()].map((index) => (
<Text key={index} style={{ flexShrink: 1 }}>
The World Wide Web Consortium (W3C)
develops international standards
for the web and HTML, CSS, and more.
</Text>
))}
</MarkedList>
</ScrollView>
);
}
import React from 'react';
import { ScrollView, StyleSheet, Text } from 'react-native';
import disc from '@jsamr/counter-style/presets/disc';
import MarkedList from '@jsamr/react-native-li';
export default function App() {
return (
<ScrollView style={{ flexGrow: 1 }}>
<MarkedList counterRenderer={disc}>
{[...Array(100).keys()].map((index) => (
<Text key={index} style={{ flexShrink: 1 }}>
The World Wide Web Consortium (W3C)
develops international standards
for the web and HTML, CSS, and more.
</Text>
))}
</MarkedList>
</ScrollView>
);
}
import React from 'react';
import { ScrollView, StyleSheet, Text } from 'react-native';
import arabicIndic from '@jsamr/counter-style/presets/arabicIndic';
import MarkedList from '@jsamr/react-native-li';
export default function App() {
return (
<ScrollView style={{ flexGrow: 1 }}>
<MarkedList
counterRenderer={arabicIndic}
rtlLineReversed
rtlMarkerReversed>
{[...Array(100).keys()].map((index) => (
<Text key={index} style={{ flexShrink: 1 }}>
يقوم اتحاد شبكة الويب العالمية
(W3C) بتطوير معايير دولية للويب و
HTML و CSS وغير ذلك الكثير.
</Text>
))}
</MarkedList>
</ScrollView>
);
}
import React from 'react';
import { ScrollView, StyleSheet, Text } from 'react-native';
import disc from '@jsamr/counter-style/presets/disc';
import MarkedList from '@jsamr/react-native-li';
export default function App() {
return (
<ScrollView style={{ flexGrow: 1 }}>
<MarkedList counterRenderer={disc} rtlLineReversed rtlMarkerReversed>
{[...Array(100).keys()].map((index) => (
<Text key={index} style={{ flexShrink: 1 }}>
يقوم اتحاد شبكة الويب العالمية
(W3C) بتطوير معايير دولية للويب و
HTML و CSS وغير ذلك الكثير.
</Text>
))}
</MarkedList>
</ScrollView>
);
}
Width is approximated with the maximum marker string length in range, but letter widths may vary a lot depending on font and scripts. Use computeMarkerBoxWidth
prop to customize width, or use markerStyle
to override width.
Don't forget to add flexShrink: 1
to your Text
element.
That's really stunningly easy:
import arabicIndic from '@jsamr/counter-style/presets/arabicIndic';
const myCustomArabicIndic = arabicIndic.withPrefix('(').withSuffix(')');
// Expect comes from jest testing framework.
// Just a showcase of expected returned values.
expect(myCustomArabicIndic.renderMarker(78)).toBe('(٧٨)');
That's really quite easy. Check @jsamr/counter-style
examples section.
FAQs
A pure JavaScript React Native component to render CSS3 compliant ordered and unordered lists.
The npm package @jsamr/react-native-li receives a total of 193,754 weekly downloads. As such, @jsamr/react-native-li popularity was classified as popular.
We found that @jsamr/react-native-li demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.