Giter VIP home page Giter VIP logo

Comments (4)

FranciscoKloganB avatar FranciscoKloganB commented on June 1, 2024

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.

SamuraiF0x avatar SamuraiF0x commented on June 1, 2024

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.

nephix avatar nephix commented on June 1, 2024

But $mono is a pre defined tamagui token. Shouldn't it already be included then?

from tamagui.

SamuraiF0x avatar SamuraiF0x commented on June 1, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.