Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 49229

Individual NPM packages

$
0
0

@ollie-w wrote:

Are there plans to publish Ionic components as individual NPM packages? I like the components but find the framework as a whole too overreaching.

For example, I am not planning to use Ionic for Routing, I could happily forgo using the menu components, yet I get this error when trying to use Ionic/React on an app that uses Reach Router.
Module not found: Error: Can't resolve 'react-router
In other cases I might want to make a site with only server-side routing.

It is also very prescriptive about how you structure your app and it applies many global styles.
For example:

body {
    background: var(--ion-background-color);
    -moz-osx-font-smoothing: grayscale;
    -webkit-font-smoothing: antialiased;
    position: fixed;
    width: 100%;
    max-width: 100%;
    height: 100%;
    max-height: 100%;
    text-rendering: optimizeLegibility;
    overflow: hidden;
    touch-action: manipulation;
    -webkit-user-drag: none;
    -ms-content-zooming: none;
    word-wrap: break-word;
    overscroll-behavior-y: none;
    -webkit-text-size-adjust: none;
    -ms-text-size-adjust: none;
    text-size-adjust: none;
    margin: 0;
    padding: 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
 margin-top:16px;
 margin-bottom:10px;
 font-weight:500;
 line-height:1.2
}
h1 {
 margin-top:20px;
 font-size:26px
}
h2 {
 margin-top:18px;
 font-size:24px
}
h3 {
 font-size:22px
}
h4 {
 font-size:20px
}
h5 {
 font-size:18px
}
h6 {
 font-size:16px
}

This approach is probably helpful for people who want their app to look good without need to write much CSS.
However, as somebody who is good at CSS and who may want a very boutique layout, I’d rather have full control over things like this. With Ionic I need to override things, often using !important, not knowing how this might effect Ionic components that rely on these styles.

What I want is a bunch of nice-looking well-built premade components. Ionic provides that, but it touches too much and involves itself too broadly for my personal taste.
Also, I am building a web site not a Native app, so don’t need Capacitor.

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 49229

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>