View Organization Block
The ViewOrganization Component is a fully customizable and accessible organization display component built with React and TypeScript. It provides a complete interface for displaying organization information with modern design patterns, flexible layout options, and comprehensive customization capabilities.
🚀 Installation
npm install @nodeblocks/frontend-view-organization-block@0.1.3
📖 Usage
import {ViewOrganization} from '@nodeblocks/frontend-view-organization-block';
- Basic Usage
- Advanced Usage
function BasicViewOrganization() {
return (
<ViewOrganization
labels={{
companyAbout: "About Company",
companyActivities: "Business Activities",
companyRegisteredInformation: "Registered Information"
}}
companyLogoUrl="/img/icon.png"
companyName="Tech Solutions Inc."
companyTags={[
{ icon: 'business', value: 'Technology' },
{ icon: 'location_on', value: 'San Francisco' }
]}
companyAbout="We are a leading technology company focused on innovative solutions."
companyActivities="Software development, consulting, and digital transformation services."
companyRegisteredInformation={[
{ label: 'Registration Number:', value: '12345678' },
{ label: 'Tax ID:', value: 'TAX-987654321' },
{ label: 'Founded:', value: '2010' }
]}
style={{padding: '16px'}}>
<ViewOrganization.CompanyBanner />
<ViewOrganization.CompanyName />
<ViewOrganization.Tags />
<ViewOrganization.AboutCompany />
<ViewOrganization.BusinessActivities />
<ViewOrganization.CorporateInformation />
</ViewOrganization>
);
}
function AdvancedViewOrganization() {
return (
<ViewOrganization
labels={{
companyAbout: '🏢 企業概要',
companyActivities: '💼 事業内容',
companyRegisteredInformation: '📋 登録情報',
}}
companyLogoUrl="/img/icon.png"
companyName="株式会社テクノロジー・イノベーション"
companyTags={[
{icon: 'business', value: 'テクノロジー'},
{icon: 'pin_invoke', value: '東京都渋谷区'},
{icon: 'group_work', value: '従業員500名'},
{icon: 'trending_up', value: '上場企業'},
]}
companyAbout="私たちは、最新のテクノロジーを活用して企業のデジタル変革を支援する業界をリードする革新的な技術企業です。AI、IoT、クラウドコンピューティングの分野で15年以上の実績を持ち、お客様の事業成長に貢献しています。"
companyActivities="ソフトウェア開発、AIソリューション、クラウドインフラストラクチャ、データ分析、IoTシステム構築、デジタルトランスフォーメーションコンサルティング、システム保守・運用サポート"
companyRegisteredInformation={[
{label: '📄 法人番号:', value: '1234567890123'},
{label: '💰 資本金:', value: '10億円'},
{label: '📅 設立年月日:', value: '2008年4月1日'},
{label: '🏦 本店所在地:', value: '東京都渋谷区神宮前1-1-1'},
{label: '👨💼 代表取締役:', value: '田中太郎'},
{label: '📞 連絡先:', value: '03-1234-5678'},
]}
style={{
background: 'linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%)',
borderRadius: '24px',
padding: '32px',
margin: '20px',
boxShadow: '0 20px 60px rgba(16, 93, 201, 0.15)',
border: '2px solid #105dc9eb',
}}
>
{({defaultBlocks, defaultBlockOrder}) => ({
blocks: {
// Enhanced company banner with sophisticated styling
companyBanner: {
...defaultBlocks.companyBanner,
props: {
...defaultBlocks.companyBanner.props,
style: {
background: 'linear-gradient(135deg, #105dc9eb 0%, #0a3f8a 100%)',
borderRadius: '20px',
padding: '32px',
textAlign: 'center',
marginBottom: '24px',
boxShadow: '0 12px 40px rgba(16, 93, 201, 0.4)',
position: 'relative',
overflow: 'hidden',
},
},
},
// Enhanced company name with premium typography
companyName: {
...defaultBlocks.companyName,
props: {
...defaultBlocks.companyName.props,
style: {
textAlign: 'center',
marginBottom: '16px',
},
children: (
<h1
style={{
color: 'black',
fontSize: '24px',
fontWeight: 'bold',
margin: '0',
lineHeight: '1.2',
}}
>
株式会社テクノロジー・イノベーション
</h1>
),
},
},
// Enhanced tags with modern styling
tags: {
...defaultBlocks.tags,
props: {
...defaultBlocks.tags.props,
children: [
{icon: 'business', value: 'テクノロジー'},
{icon: 'location_on', value: '東京都渋谷区'},
{icon: 'people', value: '従業員500名'},
{icon: 'trending_up', value: '上場企業'},
].map((tag, index) => (
<span
key={index}
style={{
background: 'white',
boxShadow: '0 4px 8px rgba(0, 0, 0, 0.1)',
color: 'black',
padding: '8px 16px',
borderRadius: '20px',
fontSize: '14px',
fontWeight: '600',
backdropFilter: 'blur(10px)',
border: '2px solidrgb(0, 0, 0)',
display: 'flex',
alignItems: 'center',
gap: '12px',
marginTop: '10px',
}}
>
{tag.icon === 'business' && '🏢'}
{tag.icon === 'location_on' && '📍'}
{tag.icon === 'people' && '👥'}
{tag.icon === 'trending_up' && '📈'}
<span>{tag.value}</span>
</span>
)),
},
},
// Enhanced about company section
aboutCompany: {
...defaultBlocks.aboutCompany,
props: {
...defaultBlocks.aboutCompany.props,
style: {
background: 'white',
borderRadius: '16px',
padding: '24px',
marginBottom: '20px',
backdropFilter: 'blur(15px)',
border: '1px solid rgb(0, 0, 0)',
},
},
},
// Enhanced business activities section
businessActivities: {
...defaultBlocks.businessActivities,
props: {
...defaultBlocks.businessActivities.props,
style: {
background: 'white',
boxShadow: '0 4px 8px rgba(0, 0, 0, 0.1)',
borderRadius: '16px',
padding: '24px',
marginBottom: '20px',
backdropFilter: 'blur(15px)',
border: '2px solid #2968cf',
boxShadow: '0 8px 32px rgba(84, 137, 219, 0.4)',
},
},
},
// Enhanced corporate information with custom layout
corporateInformation: (
<div
style={{
background: 'white',
boxShadow: '0 4px 8px rgba(0, 0, 0, 0.1)',
borderRadius: '16px',
padding: '24px',
backdropFilter: 'blur(15px)',
}}
>
<div
style={{
display: 'flex',
alignItems: 'center',
gap: '12px',
marginBottom: '20px',
}}
>
<span
style={{
fontSize: '24px',
color: 'white',
}}
>
📋
</span>
<h3
style={{
fontSize: '20px',
fontWeight: 'bold',
color: 'black',
margin: '0',
}}
>
登録情報
</h3>
</div>
<div
style={{
display: 'grid',
gridTemplateColumns: 'repeat(2, 1fr)',
gap: '16px',
}}
>
{[
{label: '📄 法人番号:', value: '1234567890123'},
{label: '💰 資本金:', value: '10億円'},
{label: '📅 設立年月日:', value: '2008年4月1日'},
{label: '🏦 本店所在地:', value: '東京都渋谷区神宮前1-1-1'},
{label: '👨💼 代表取締役:', value: '田中太郎'},
{label: '📞 連絡先:', value: '03-1234-5678'},
].map((item, index) => (
<div
key={index}
style={{
background: 'white',
boxShadow: '0 4px 8px rgba(0, 0, 0, 0.1)',
padding: '16px',
borderRadius: '12px',
border: '1px solid rgb(0, 0, 0)',
transition: 'all 0.3s ease',
}}
>
<div
style={{
fontWeight: 'bold',
color: 'black',
fontSize: '14px',
}}
>
{item.label}
</div>
<div
style={{
color: 'black',
fontSize: '14px',
lineHeight: '1.4',
}}
>
{item.value}
</div>
</div>
))}
</div>
</div>
),
},
blockOrder: defaultBlockOrder,
})}
</ViewOrganization>
);
}
🔧 Props Reference
Main Component Props
| Prop | Type | Default | Description |
|---|---|---|---|
labels | Labels | Required | Labels configuration for different sections |
labels.companyAbout | ReactNode | undefined | Label for the company about section |
labels.companyActivities | ReactNode | undefined | Label for the company activities section |
labels.companyRegisteredInformation | ReactNode | undefined | Label for the registered information section |
companyLogoUrl | string | undefined | URL for the company logo image |
companyName | ReactNode | undefined | Company name to display |
companyTags | Array<{icon: IconType, value: string}> | undefined | Array of tags with icons and values |
companyAbout | ReactNode | undefined | Company about description content |
companyActivities | ReactNode | undefined | Company activities description content |
companyRegisteredInformation | Array<{label: ReactNode, value: string}> | undefined | Array of registered information items |
children | BlocksOverride | undefined | Custom block components to override default rendering |
className | string | undefined | Additional CSS class name for styling the container |
Note: This component inherits all props from the HTML div element.
Sub-Components
The ViewOrganization component provides several sub-components. All sub-components receive their default values from the main component's context and can override these values through props.
ViewOrganization.Tag
| Prop | Type | Default | Description |
|---|---|---|---|
size | enum | "S" | Size of the tag |
icon | enum | undefined | Icon to display in the tag |
label | string | undefined | Text content of the tag |
className | string | undefined | Additional CSS class name for styling |
ViewOrganization.Title
| Prop | Type | Default | Description |
|---|---|---|---|
prefix | ReactNode | undefined | Content to display before the title |
companyName | ReactNode | From context | Company name to display as title |
children | ReactNode | companyName | Title content - overrides companyName if provided |
direction | enum | "column" | Flex direction for action buttons |
alignItems | enum | "stretch" | Alignment of items in the container |
gapSize | enum | "S" | Gap between items in the container |
className | string | undefined | Additional CSS class name for styling |
ViewOrganization.DescriptionDetailBlock
| Prop | Type | Default | Description |
|---|---|---|---|
icon | enum | undefined | Icon to display next to the label |
label | ReactNode | undefined | Label text for the detail block |
value | ReactNode | undefined | Value content for the detail block |
children | ReactNode | Default content | Custom content - overrides default label/value layout |
direction | enum | "column" | Flex direction for action buttons |
alignItems | enum | "stretch" | Alignment of items in the container |
gapSize | enum | "S" | Gap between items in the container |
className | string | undefined | Additional CSS class name for styling |
ViewOrganization.CompanyBanner
| Prop | Type | Default | Description |
|---|---|---|---|
companyLogoUrl | string | From context | URL for the company logo image |
direction | enum | "column" | Flex direction for action buttons |
alignItems | enum | "stretch" | Alignment of items in the container |
gapSize | enum | "S" | Gap between items in the container |
className | string | undefined | Additional CSS class name for styling |
ViewOrganization.CompanyName
| Prop | Type | Default | Description |
|---|---|---|---|
companyName | ReactNode | From context | Company name to display |
children | ReactNode | companyName | Title content - overrides companyName if provided |
direction | enum | "column" | Flex direction for action buttons |
alignItems | enum | "stretch" | Alignment of items in the container |
gapSize | enum | "S" | Gap between items in the container |
className | string | undefined | Additional CSS class name for styling |
ViewOrganization.Tags
| Prop | Type | Default | Description |
|---|---|---|---|
companyTags | Array<{icon: IconType, value: string}> | From context | Array of tags to display |
children | ReactNode | Default tags | Custom tags content - overrides companyTags if provided |
direction | enum | "column" | Flex direction for action buttons |
alignItems | enum | "stretch" | Alignment of items in the container |
gapSize | enum | "S" | Gap between items in the container |
className | string | undefined | Additional CSS class name for styling |
ViewOrganization.AboutCompany
| Prop | Type | Default | Description |
|---|---|---|---|
companyAbout | ReactNode | From context | Company about content |
icon | enum | "business" | Icon for the about section |
direction | enum | "column" | Flex direction for action buttons |
alignItems | enum | "stretch" | Alignment of items in the container |
gapSize | enum | "S" | Gap between items in the container |
className | string | undefined | Additional CSS class name for styling |
ViewOrganization.BusinessActivities
| Prop | Type | Default | Description |
|---|---|---|---|
companyActivities | ReactNode | From context | Company activities content |
icon | enum | "sticky_note_2" | Icon for the activities section |
direction | enum | "column" | Flex direction for action buttons |
alignItems | enum | "stretch" | Alignment of items in the container |
gapSize | enum | "S" | Gap between items in the container |
className | string | undefined | Additional CSS class name for styling |
ViewOrganization.CorporateInformation
| Prop | Type | Default | Description |
|---|---|---|---|
companyRegisteredInformation | Array<{label: ReactNode, value: string}> | From context | Array of registered information items |
icon | enum | "info" | Icon for the corporate information section |
direction | enum | "column" | Flex direction for action buttons |
alignItems | enum | "stretch" | Alignment of items in the container |
gapSize | enum | "S" | Gap between items in the container |
className | string | undefined | Additional CSS class name for styling |
🔧 TypeScript Support
Full TypeScript support with comprehensive type definitions:
import {ViewOrganization} from '@nodeblocks/frontend-view-organization-block';
import {ReactNode} from 'react';
interface Labels {
companyAbout?: ReactNode;
companyActivities?: ReactNode;
companyRegisteredInformation?: ReactNode;
}
// Component props interface
interface ViewOrganizationProps {
labels: Labels;
companyLogoUrl?: string;
companyName?: ReactNode;
companyTags?: { icon: IconType; value: string }[];
companyAbout?: ReactNode;
companyActivities?: ReactNode;
companyRegisteredInformation?: { label: ReactNode; value: string }[];
className?: string;
}
const MyViewOrganization = () => {
const organizationData = {
labels: {
companyAbout: "About Our Company",
companyActivities: "What We Do",
companyRegisteredInformation: "Legal Information"
},
companyLogoUrl: "https://example.com/logo.png",
companyName: "Tech Solutions Inc.",
companyTags: [
{ icon: 'business' as IconType, value: 'Technology' },
{ icon: 'location_on' as IconType, value: 'San Francisco' },
{ icon: 'people' as IconType, value: '500+ Employees' }
],
companyAbout: "We are a leading technology company...",
companyActivities: "Software development, consulting...",
companyRegisteredInformation: [
{ label: 'Registration Number:', value: '12345678' },
{ label: 'Tax ID:', value: 'TAX-987654321' }
]
};
return (
<ViewOrganization {...organizationData}>
<ViewOrganization.CompanyBanner />
<ViewOrganization.CompanyName />
<ViewOrganization.Tags />
<ViewOrganization.AboutCompany />
<ViewOrganization.BusinessActivities />
<ViewOrganization.CorporateInformation />
</ViewOrganization>
);
};
Built with ❤️ using React, TypeScript, and modern web standards.