Tree-shake to specific modules
Use this when the all-in-one bundle is bigger than you need and you want to ship only the components you actually use.
Pass a $feature-list
The simplest path. List the flags you want emitted; everything else is
stripped. The flat category-name shape mirrors how flags are referenced
internally.
// app.scss: opt in via the $feature-list
@use '@adnap/krysalicss' with (
$feature-list: (
base-reset,
base-global,
typography-base,
typography-title,
typography-link,
layout-container,
layout-flex,
element-button,
helper-breakpoints,
),
);
Available flags
base-resetbase-globallayout-containerlayout-flexlayout-gridlayout-herolayout-footertypography-basetypography-titletypography-linktypography-contenttypography-tablemodule-cardmodule-alertmodule-fieldmodule-navbarmodule-modalmodule-tabsmodule-dropdownmodule-sectionelement-buttonelement-badgeelement-progresselement-text-inputelement-textareaelement-selectelement-checkboxelement-radioelement-switchelement-fileelement-rangehelper-breakpointshelper-statehelper-visibilityhelper-spacinghelper-texthelper-colorhelper-flexhelper-sizinghelper-positionhelper-shadowhelper-borderhelper-interactionshelper-ratiohelper-object-fithelper-overflowhelper-stackelement-spinnerelement-boxelement-dividermodule-breadcrumbmodule-paginationtypography-leadtypography-blockquotetypography-listhelper-font-sizehelper-line-heighthelper-tooltipmodule-buttonsmodule-toastmodule-popoverelement-imagetypography-figure
Per-module imports
For maximum control, skip the entry file and pull the modules directly. This requires you to import variables and a theme yourself:
// app.scss: compose your own entry from per-module imports
@use '@adnap/krysalicss/variables';
@use '@adnap/krysalicss/helper/breakpoints';
@use '@adnap/krysalicss/typography/base';
@use '@adnap/krysalicss/typography/title';
@use '@adnap/krysalicss/element/button';
@use '@adnap/krysalicss/theme/default';
Related
- Architecture overview: how feature flags propagate through the SCSS module graph.
- Override component variables: combine with feature gating to fully customise the output.