Oihana Next UI - 0.1.47

Application logo

Headers Component

PageHeader Examples

Title Only

<PageHeader title="Products" />

Title + Description

<PageHeader
    title       = "Products"
    description = "Browse and manage the full product catalog."
/>

Title + Subtitle + Description

<PageHeader
    title       = "Products"
    subtitle    = "48 results"
    description = "Browse and manage the full product catalog."
/>

With Icon

import { AiFillProduct } from 'react-icons/ai' ;
<PageHeader
    icon        = { AiFillProduct }
    title       = "Products"
    description = "Browse and manage the full product catalog."
/>

With Right Actions

<PageHeader
    icon  = { AiFillProduct }
    title = "Products"
    right = {
        <div className="flex items-center gap-2">
            <Button icon={ MdRefresh } />
            <Button color="primary" icon={ MdAdd }>Add</Button>
        </div>
    }
/>

With Divider

Content below the divider...

<PageHeader
    showDivider = { true }
    title       = "Products"
/>

With Motion Animation

import SlideDown from 'oihana-next-ui/motions/SlideDown' ;
<PageHeader
    animated        = { true }
    MotionComponent = { SlideDown }
    motionOptions   = { { delay: 0, start: -20 } }
    title           = "Notifications"
/>

Custom Avatar Content

<PageHeader
    avatar  = { <span className="font-bold">BC</span> }
    title   = "B Comme Bois"
    subtitle = "Wood & Timber"
/>

Without Avatar

<PageHeader
    showAvatar  = { false }
    title       = "Settings"
    description = "Manage your account and preferences."
/>

Real-world — ThingsPage Header

Usage via ThingsPage — the header is rendered automatically from i18n + icon props.

← Rendered by ThingsPage when showHeader=true

<ThingsPage
    icon            = { AiFillProduct }
    path            = "app.products"
    showHeader      = { true }
    showDescription = { true }
    refreshable     = { true }
    addable         = { true }
    addPath         = "/products/add"
    url             = "products"
/>