Txt
Text in the platform's type scale, coloured by a role of the current theme.
Mobile uniquement — React Native, depuis @krizaka/ui/native. Bêta : son API peut encore changer à une version mineure.
Pourquoi il est là. Used by Orochia, Orazaka.
Quand l’utiliser
- For every text of a React Native screen: titles, body, captions, labels, figures (
mono).
Quand ne pas l’utiliser
Installation
Installer
npx expo install react-native-svg
npm install @krizaka/uiImporter
import { Txt } from "@krizaka/ui/native";Enveloppez l’application une fois dans ThemeProvider de @krizaka/ui/native : chaque composant lit ses rôles de couleur.
Exemples
React Native n’a pas d’aperçu en direct sur le web : chaque exemple montre la capture de sa story, testée dans les deux thèmes, et le code à copier.
Variants
display, title, body, caption, label, mono.


Tones
text, secondary, muted, accent.


Props
Text in the platform's scale, coloured by a role of the current theme. title and display are headers for screen readers.
| Prop | Type | Défaut | Description |
|---|---|---|---|
tone | TxtTone | text | A text role of the theme (default text). |
variant | TxtVariant | body | The type scale: display · title · body (default) · caption · label · mono (tabular figures). |
Accessibilité
titleanddisplayare headers for screen readers.- It follows the system's font scaling.
Bonnes pratiques
- Pick a
variantfrom the scale and atonefrom the roles: never a font size or a colour by hand. mutedonly for large text or what is off: it reaches AA only as large text.
Composants liés
Générée depuis le code de @krizaka/ui 3.9.0 : son meta.ts, ses exemples et ses types.Modifier cette documentation sur GitHub