Layout

View

A highly customizable primitive container replacing standard divs with built-in styling props.

Box Model

The View component is the fundamental building block. It provides shorthands for padding, margin, sizing, and styling.

Styled View

'use client'

import React from 'react'
import { View, Text } from 'biibaos'

export default function App() {
  return (
    <View 
      p={24} 
      bg="primary" 
      radius="xl" 
      shadow="lg"
      style={{ width: 200, height: 100, display: 'flex', alignItems: 'center', justifyContent: 'center' }}
    >
      <Text color="white" weight="bold">Styled View</Text>
    </View>
  )
}

Layout & Sizing

Control display, flex behavior, and precise dimensions.

'use client'

import React from 'react'
import { View } from 'biibaos'

export default function LayoutExample() {
  return (
    <View display="flex" gap={12} align="center">
      <View w={60} h={60} bg="primary" radius="full" />
      <View flex={1} h={40} bg="secondary" radius="md" />
    </View>
  )
}

Properties

PropTypeDefaultDescription
askeyof JSX.IntrinsicElementsHTML tag type to render (button or a)
childrenReact.ReactNodeMain descriptive text or overlay children layout
display'flex' | 'inline-flex' | 'block' | 'inline-block' | 'grid' | 'none'Configures the display option
direction'row' | 'row-reverse' | 'column' | 'column-reverse'Configures the direction option
align'flex-start' | 'center' | 'flex-end' | 'stretch' | 'baseline'Horizontal text alignment (left, center, right, justify)
justify'flex-start' | 'center' | 'flex-end' | 'space-between' | 'space-around' | 'space-evenly'Configures the justify option
wrap'nowrap' | 'wrap' | 'wrap-reverse'Configures the wrap option
gapnumber | stringConfigures the gap option
pnumber | stringUniform padding shorthand in pixels or spacing keys
pxnumber | stringHorizontal padding shorthand
pynumber | stringVertical padding shorthand
ptnumber | stringTop padding shorthand
pbnumber | stringBottom padding shorthand
plnumber | stringLeft padding shorthand
prnumber | stringRight padding shorthand
mnumber | stringUniform margin shorthand
mxnumber | stringHorizontal margin shorthand
mynumber | stringVertical margin shorthand
mtnumber | stringTop margin shorthand
mbnumber | stringBottom margin shorthand
mlnumber | stringLeft margin shorthand
mrnumber | stringRight margin shorthand
wnumber | stringWidth shorthand in pixels or percent
hnumber | stringHeight shorthand
minWnumber | stringMinimum width constraint
maxWnumber | stringMaximum width constraint
minHnumber | stringMinimum height constraint
maxHnumber | stringMaximum height constraint
bg'primary' | 'secondary' | 'surface' | 'surface-raised' | 'bg' | 'danger' | 'success' | 'warning' | 'info' | 'transparent' | stringPredefined theme color background token or custom hex code
color'primary' | 'text' | 'muted' | 'subtle' | 'danger' | 'success' | 'warning' | 'info' | stringPredefined theme typography color token or hex code
radius'none' | 'sm' | 'md' | 'lg' | 'xl' | 'full' | number | stringPredefined corner rounding preset (none, sm, md, lg, xl, full)
borderboolean | stringDraws a border boundary
shadow'sm' | 'md' | 'lg' | 'none'Elevation shadow preset (none, sm, md, lg)
position'static' | 'relative' | 'absolute' | 'fixed' | 'sticky'CSS layout positioning model
overflow'visible' | 'hidden' | 'scroll' | 'auto'Content clipping overflow model
flexnumber | stringFlexbox growth parameter shorthand
keystring]: anyConfigures the key option