Wechsle sofort zwischen hell, dunkel oder System, oder tausche den gesamten Look mit einer Theme-Variante. Native-UI liefert zwei: Aurora (die Originale) und die neue Bloom (weich, abgerundet, violett). Jede Variante trägt eigene Akzent-Presets, und customAccent überschreibt weiterhin eine einzelne Farbe. Du übergibst nur das, was sich ändert.
Jede Oberfläche - Farbe, Abstand, Radius, Typografie, Schatten - ist ein benannter Token. Komponenten lesen nur Tokens; das Ändern eines Tokens wirkt sich systemweit aus.
Jede interaktive Komponente kommt mit Barrierefreiheits-Defaults: Labels, Hit-Slops, Fokus-Reihenfolge, Screenreader-Rollen, Reduce-Motion-Respekt. Du kannst jeden Default pro Instanz überschreiben.
<Buttonvariant="primary"accessibilityLabel="Save profile and continue"accessibilityHint="Saves your changes and moves to the next step"onPress={save}
>Save</Button>
Plattformverhalten
Komponenten passen sich an die Host-Plattform an: iOS nutzt SF-natives Druck-Feedback und Sheet-Dimensionierung, Android nutzt Ripple und Material-Elevation. Du erhältst Plattform-Korrektheit, ohne Plattform-Code zu schreiben.
// The same component renders correctly on both platforms.<BottomSheetsnapPoints={['40%', '90%']}>
<Heading>Chooseaplan</Heading>
</BottomSheet>
Änderungsprotokoll
v1.7.1
Stabil
Behoben
Add the react-native condition to the root exports entry so Metro resolves the TypeScript source instead of the dist bundles. Metro in React Native 0.84 enables package exports by default, and an exports map takes precedence over the top-level react-native field, so consumers were bundling both dist flavours (.mjs and .js) at once and needed per-app resolveRequest workarounds.
v1.7.0
Stabil
Hinzugefügt
Add the Bloom theme variant and a theme config key. NativeUIProvider now accepts theme: 'default' | 'bloom' | ThemeVariant. A theme variant bundles a complete visual identity (colour palette, corner radii, elevation, type density, and default fonts) behind one name and restyles every component. The new Bloom variant is a soft, rounded look: violet/pink accents, rounded corners, purple-tinted neutrals, and Outfit + Plus Jakarta Sans typography. The original look ships unchanged as the Aurora ('default') variant, so existing apps are unaffected. FontFamilies gains an optional display group so a variant can pair a heading family with a separate body family. New exports: THEME_VARIANTS, defaultThemeVariant, bloomThemeVariant, resolveThemeVariant, defaultColorPalette, bloomColorPalette, BLOOM_PRESETS, bloomFontFamilies, and the types ThemeVariant, ThemeVariantName, ColorPalette, TextRamp, SemanticRamp, NeutralRamp, BloomPreset, BorderRadiusScale.