Skip to content

KFlex

flex layout component

Install

bash
pnpm add @ikun-ui/flex
bash
yarn add @ikun-ui/flex
bash
npm install @ikun-ui/flex

Basic usage

The basic usage.

Justify and align

Supports adjusting justify and align, the values should conform to the justify and align values of tailwindcss

Gap

The gap attribute can jump the gap and supports sm, md, lg and custom numbers.

Wrap

Auto wrap line.

Flex Props

NameTypeDefaultDescription
verticalbooleanfalseIs direction of the flex vertical.
wrap'wrap' | 'nowrap' | 'wrap-reverse''normal'Set whether the element is displayed in a single line or in multiple lines.
justify'normal' | 'start'| 'end'| 'center'| 'between'| 'around' | 'evenly' | 'stretch''normal'Sets the alignment of elements in the direction of the main axis.
align'center' | 'start' | 'end' | 'baseline' | 'normal' | 'stretch''normal'Sets the alignment of elements in the direction of the cross axis.
flexstring-Flex CSS shorthand properties.
gap'sm' | 'md' | 'lg' | number-Sets the gap between grids.
elmstringdivCustom element type.
clsstring''Additional class for component
attrsany{}Additional attributes

Flex Slots

NameDescription
defaultcontent of the flex component.

MIT Licensed