Component CSS blocks
Turn component CSS families on or off and configure their icons and counts with the blocks option.
On this page
The blocks option of systhema.config decides which component CSS families the Tailwind plugin emits, and configures the few that take settings (icons, column counts). Every block is on by default; turn off the ones a project does not use to keep the stylesheet small.
Configuring blocksLink to this section
Each key accepts a boolean. The blocks that take settings also accept an object; an object turns the block on unless it sets enabled: false, so false and { enabled: false } both disable a block.
import type { SysthemaConfig } from '@systhemaui/core'
const config: SysthemaConfig = {
blocks: {
carousel: false,
gallery: false,
columns: { count: 6 },
grid: { paddingCols: 8 },
accordion: { openRotate: 45 },
},
}
export default configYour blocks object is merged into the defaults, so list only the blocks you change.
Every blockLink to this section
| Block | Default | Settings | Emits |
|---|---|---|---|
rootVariables | on | – | The :root token variables and [data-theme] bindings (Root variables) |
variablesUtilities | on | – | variables, theme-* and sizing-* (Variable utilities) |
applicationLayout | on | – | Base layout rules: html, body, main, container, skip-link, figure |
swiper | on | – | Swiper base styles for Gallery and Carousel |
grid | on | paddingCols (6) | Grid utilities, col-mx-0 to col-mx-<paddingCols> |
gap | on | – | Gap utilities |
typography | on | – | Typography text style and color classes |
link | on | – | Link |
layout | on | – | bg-layout-* (Colors) |
container | on | – | *-container utilities (Container) |
header | on | subNavigationIcon, menuIcon | Header |
footer | on | – | Footer |
article | on | – | Article |
hero | on | – | Hero |
section | on | – | Section spacing utilities |
columns | on | count (4) | Columns, columns-cols-1 to columns-cols-<count> |
feature | on | – | Feature |
stack | on | – | Stack |
gallery | on | prevIcon, nextIcon | Gallery |
figure | on | – | Figure width classes |
richtext | on | – | The richtext rhythm (Spacing model) |
icon | on | – | Icon |
list | on | checkedIcon, uncheckedIcon | List |
media | on | overlayIcon | Image, Video, MediaWrapper |
carousel | on | wrapperPrevIcon, wrapperNextIcon, bottomPrevIcon, bottomNextIcon | Carousel |
avatar | on | – | Avatar |
button | on | icon | Button |
chip | on | – | Chip |
card | on | – | Card |
accordion | on | closedIcon, openedIcon, openRotate (false) | Accordion |
quote | on | icon | Quote |
separator | on | – | Separator |
form | on | selectIcon, checkboxIcon | Form controls |
posts | on | – | Posts module presentation (PostsList CSS) |
cookieConsent | on | – | Cookie consent banner |
IconsLink to this section
Icon settings are CSS mask-image values. The icon is painted in the element's current color through the mask, so the SVG's own fill does not matter. Pass a data URL:
const chevron = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3E%3Cpath d='M480-344 240-584l56-56 184 184 184-184 56 56-240 240Z'/%3E%3C/svg%3E")`
const config: SysthemaConfig = {
blocks: {
header: { subNavigationIcon: chevron },
form: { selectIcon: chevron },
},
}Encode <, > and # in the SVG (%3C, %3E, %23) and use single quotes inside it, as above.
The header menu toggle takes either a pair of static icons or the built-in animated icon:
const config: SysthemaConfig = {
blocks: {
header: { menuIcon: { type: 'animated' } },
},
}With type: 'static' (the default), set openIcon and closeIcon the same way as the other icons. For the accordion, openedIcon replaces closedIcon while an item is open, and openRotate rotates the icon by that many degrees when open (false, the default, does not rotate). Both icons also accept false: no closed icon, or no swap.
Blocks that borrow another block's classesLink to this section
Some component rules apply another block's utility instead of repeating its declarations: .form-label takes text-form-label, and formatted rich text takes the heading styles, link, quote, separator and the list classes. Those bindings follow the flag of the block that owns the class, so turning link off while keeping richtext on skips the link binding instead of breaking the build. See Components that borrow another block's classes.
Container blocks (stack, card, hero, columns and others) also suppress the scroll reveals of their children; see Child reveals.