A React Native UI component library with design tokens, theming (light/dark), and glassmorphism support.
yarn add @hikayat/hikayat-daily-ui
# or
npm install @hikayat/hikayat-daily-uiyarn add react-native-linear-gradient react-native-svg
react-native-linear-gradientandreact-native-svgare optional — only needed if you useGlassContaineror SVG-based components.
This library uses the Roboto font family. Link the fonts in your React Native project:
Roboto-LightRoboto-RegularRoboto-MediumRoboto-BoldRoboto-Black
Wrap your app with ThemeProvider:
import { ThemeProvider } from '@hikayat/hikayat-daily-ui';
export default function App() {
return (
<ThemeProvider defaultPreference="system">
<YourApp />
</ThemeProvider>
);
}Use components and tokens:
import {
Text,
Button,
TextInput,
Spacer,
Colors,
spacing,
useThemeColors,
} from '@hikayat/hikayat-daily-ui';
function MyScreen() {
const colors = useThemeColors();
return (
<View style={{ flex: 1, backgroundColor: colors.background, padding: spacing.md }}>
<Text variant="h2" weight="bold">Hello World</Text>
<Spacer unit={16} />
<TextInput label="Email" placeholder="you@example.com" />
<Spacer unit={12} />
<Button title="Sign In" onPress={() => {}} variant="primary" fullWidth />
</View>
);
}| Token | Description |
|---|---|
Colors |
80+ semantic color tokens across 14 palettes |
Gradients |
50+ gradient presets (glass, AI, status, overlay) |
spacing |
4px grid system (xxs through massive) |
borderRadius |
Consistent border radius scale |
typography |
30+ Material Design 3-inspired text presets |
fontFamily |
Roboto font family definitions |
fontSize |
xs (10) through 5xl (40) |
iconSize / avatarSize |
Standard size scales |
hitSlop |
Accessibility touch target presets |
- Light and dark themes with 60+ semantic color properties
ThemeProviderwith system preference detectionuseThemeColors(),useThemeGradients(),useIsDarkMode()hooksonThemeChangecallback for external persistence (Redux, AsyncStorage, etc.)
The ThemeProvider is storage-agnostic. Use onThemeChange to persist:
<ThemeProvider
defaultPreference={savedPreference}
onThemeChange={(pref) => AsyncStorage.setItem('theme', pref)}
/>- Primary — Slate Blue-Gray (#7D93A0)
- Secondary — Slate Purple (#7D82A0)
- Tertiary — Slate Teal (#7DA09C)
- Success — Sage Green (#5CA37E)
- Warning — Muted Gold (#C3B43C)
- Error — Terracotta (#B85C47)
- Info — Steel Blue (#4A6E84)
- AI Teal — Aurora (#14B8A6)
- AI Purple — Aurora (#A855F7)
- AI Gold — Amber (#F59E0B)
- AI Violet — Deep (#7C3AED)
MIT
