Fluent API Chainable style modifications
The Fluent API allows chaining style methods for a more expressive syntax.
import { fluent, stack } from '@ogxjs/core' ;
const element = fluent ( stack ( 'items-center' ))
. bg ( 'zinc-950' )
. padding ( '8' )
. rounded ( 'xl' )
. shadow ( 'lg' )
.element; // get the final element
Method Example Result gap(val).gap('4')gap-4padding(val).padding('8')p-8px(val).px('4')px-4py(val).py('4')py-4margin(val).margin('4')m-4mt(val).mt('4')mt-4rounded(val).rounded('xl')rounded-xl
Method Example Result center().center()items-center justify-centeritemsCenter().itemsCenter()items-centerjustifyCenter().justifyCenter()justify-centerjustifyBetween().justifyBetween()justify-between
Method Example Result bg(color).bg('zinc-950')bg-zinc-950text(color).text('white')text-whiteborder(color).border('white/10')border border-white/10shadow(size).shadow('lg')shadow-lgopacity(val).opacity('50')opacity-50