Comments (4)
I had a similar issue with Poppins
. I created a createPoppins
helper exactly like the ones I saw on Tamagui packages and used it as { fonts: { body } }
.
I'm new to React Native and to Tamagui. I wish the documentation was more explicit on how to set up, how things work, how to customize parts of the theme. Alas, after spending some time going through the docs, configuration, and application flow I came to understand the issue. So, @nephix, the error is telling you that there is no font associated with monospace
. You will need to add one additional entry to your useFonts
hook: 'ui-monospace': require('path/to/my/monospace-font')
.
@natew I might be a bit out of reach, but I feel like it is difficult to adopt a technology like Tamagui if the documentation does not help you get started with the unique features provided by Tamagui. No matter how amazing the tools/features are. I know I can't compare apples to potatoes (web vs. native), especially because of the experience I accumulated on the web and certainly lack in native. However, onboarding PandaCSS
which has a very similar philosophy to Tamagui and an equally high learning curve (gotta know how to represent a design system as code), was a breeze.
In retrospect before PandaCSS, I was a massive Tailwind user who barely ever touched real CSS except for punctual fixes or adjustments in big SaaS projects. I also faced some challenges on that framework, eventually, but mostly on very very advanced use cases and never on "getting started".
In short, I really think documentation is the highest barrier to adoption and simultaneously the biggest risk for churn Tamagui will face in the medium term. Time may prove me wrong, especially, if Studio comes out well. However, before investing too much in Studio and Takeout and Bento, all at once. Consider adding better documentation. Extensive API details and most of all more helpers/builder functions to the createThemeBUilder
. Let me know if there's any way I can contribute or help with anything.
Edit: We need more guides like this oen https://tamagui.dev/docs/guides/how-to-build-a-button
from tamagui.
Hi @nephix, you need to import the new font first. I think the easiest way to do this is to use useFont
from expo and google font.
You can find a full list of google fonts here.
Please refer to docs for more info.
Thank you for your feedback @FranciscoKloganB, did you check expo docs recently? I've made changes especially to the font section where you can switch between internal tamagui font or expo google font. Let me know if something can be made more clear :)
from tamagui.
But $mono
is a pre defined tamagui token. Shouldn't it already be included then?
from tamagui.
You still need to load it here:
const [loaded] = useFonts({
Inter: require("@tamagui/font-inter/otf/Inter-Medium.otf"),
InterBold: require("@tamagui/font-inter/otf/Inter-Bold.otf"),
});
from tamagui.
Related Issues (20)
- Tamagui throws error when using Expo 51 New Arch HOT 16
- DatePicker on mobile HOT 2
- Can't upgrade to expo 50 HOT 1
- Tamagui class font weights broken when upgrading to Expo 51 HOT 1
- [Documentation] Changing package manager does not change the command on other code block HOT 3
- [Feature request] Wrap Burnt alerts
- Please Update lucide icon version
- Why can't the website open? HOT 2
- SVG tags being wrapped HOT 4
- Render Error: Cannot read property 'state' of undefined HOT 1
- [Bug] Select Trigger causes submission when inside a form (Web)
- Enter animations don't work with CSS HOT 1
- Datepicker Bento Component Error Android Only HOT 1
- @tamagui/constants esm build is missing platform-specific .mjs files HOT 8
- Error when build application with animations-moti HOT 3
- Button pressStyle stuck on after first press HOT 1
- Cannot find module 'react-dom' from Tamagui 1.97.0 in bare React Native HOT 2
- Why does TamaGUI has so big slowdown in performance? HOT 2
- Input component Errors out on React Native: Cannot read property useRef of null HOT 10
- screen will flash when too fast to toggle two dialog.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tamagui.