DScreen Component Documentation
DScreen
is a versatile React component designed for creating complex screen layouts with vertical and horizontal bars and a content area. This documentation provides an in-depth guide on how to use the DScreen
component and its subcomponents.
Installation
Import the DScreen
component into your project:
Usage
The DScreen
component and its subcomponents can be used to create various screen layouts. Below are some examples illustrating different configurations.
Example: Basic Layout
Component API
DScreen
The main container component.
Props
children
(required): An array ofReact.ReactElement
containingVBar
,HBar
,Content
, andItem
components.
Example
VBar
A vertical bar component. Can be either Top
or Bottom
.
Props
children
: Content to be displayed inside the vertical bar.
Example
HBar
A horizontal bar component. Can be either Left
or Right
.
Props
children
: Content to be displayed inside the horizontal bar.
Example
Content
The main content area component.
Props
children
: Content to be displayed inside the main content area.
Example
Item
A span element component, used for displaying items within the layout.
Props
children
: Content to be displayed inside the item.active
(optional): A boolean indicating if the item is active. Defaults tofalse
.
Example
Summary
DScreen
is a powerful component for creating structured layouts with vertical and horizontal bars. By combining VBar
, HBar
, Content
, and Item
components, you can achieve a wide variety of layouts to suit your application’s needs.