@olwiba/ui 0.2.25 → 0.2.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/content/docs/app/app-shell.mdx +71 -0
- package/content/docs/app/auth-section.mdx +73 -0
- package/content/docs/app/billing-panel.mdx +38 -0
- package/content/docs/app/empty-state.mdx +47 -0
- package/content/docs/app/error-page.mdx +31 -0
- package/content/docs/app/index.mdx +13 -0
- package/content/docs/app/meta.json +4 -0
- package/content/docs/app/onboarding-wizard.mdx +41 -0
- package/content/docs/app/settings-section.mdx +37 -0
- package/content/docs/app/team-members-panel.mdx +35 -0
- package/content/docs/app/update-banner.mdx +43 -0
- package/content/docs/components/activity-feed.mdx +42 -0
- package/content/docs/components/chart.mdx +47 -0
- package/content/docs/components/command-menu.mdx +41 -0
- package/content/docs/components/confirm-dialog.mdx +26 -0
- package/content/docs/components/context-menu.mdx +26 -0
- package/content/docs/components/data-table.mdx +40 -0
- package/content/docs/components/dock.mdx +26 -0
- package/content/docs/components/feature-card.mdx +26 -0
- package/content/docs/components/file-upload.mdx +35 -0
- package/content/docs/components/full-page-spinner.mdx +44 -0
- package/content/docs/components/glass-card.mdx +26 -0
- package/content/docs/components/image-card.mdx +26 -0
- package/content/docs/components/index.mdx +49 -0
- package/content/docs/components/load-more.mdx +34 -0
- package/content/docs/components/meta.json +35 -0
- package/content/docs/components/notifications-popover.mdx +34 -0
- package/content/docs/components/notify.mdx +40 -0
- package/content/docs/components/olwiba-ui-context.mdx +69 -0
- package/content/docs/components/page-header.mdx +42 -0
- package/content/docs/components/pricing-card.mdx +26 -0
- package/content/docs/components/register-hotkeys.mdx +50 -0
- package/content/docs/components/root-error-fallback.mdx +39 -0
- package/content/docs/components/spotlight.mdx +26 -0
- package/content/docs/components/stat-card.mdx +26 -0
- package/content/docs/components/suspensed.mdx +42 -0
- package/content/docs/components/testimonial-card.mdx +26 -0
- package/content/docs/components/theme-color-updater.mdx +40 -0
- package/content/docs/components/theme-switch-minimal.mdx +32 -0
- package/content/docs/components/version-banner.mdx +44 -0
- package/content/docs/email/action-email.mdx +62 -0
- package/content/docs/email/email-layout.mdx +58 -0
- package/content/docs/email/email-link-fallback.mdx +46 -0
- package/content/docs/email/index.mdx +32 -0
- package/content/docs/email/meta.json +10 -0
- package/content/docs/email/notice-email.mdx +51 -0
- package/content/docs/hooks/index.mdx +21 -0
- package/content/docs/hooks/meta.json +16 -0
- package/content/docs/hooks/use-confirm.mdx +81 -0
- package/content/docs/hooks/use-controlled-open.mdx +53 -0
- package/content/docs/hooks/use-copy-to-clipboard.mdx +26 -0
- package/content/docs/hooks/use-debounce.mdx +26 -0
- package/content/docs/hooks/use-intersection-observer.mdx +26 -0
- package/content/docs/hooks/use-local-storage.mdx +26 -0
- package/content/docs/hooks/use-media-query.mdx +26 -0
- package/content/docs/hooks/use-mounted.mdx +39 -0
- package/content/docs/hooks/use-pagination.mdx +26 -0
- package/content/docs/hooks/use-scrolled-past.mdx +44 -0
- package/content/docs/index.mdx +68 -0
- package/content/docs/marketing/contact-section.mdx +16 -0
- package/content/docs/marketing/cta-section.mdx +31 -0
- package/content/docs/marketing/faq-section.mdx +16 -0
- package/content/docs/marketing/features-section.mdx +23 -0
- package/content/docs/marketing/footer.mdx +16 -0
- package/content/docs/marketing/hero-section.mdx +16 -0
- package/content/docs/marketing/index.mdx +22 -0
- package/content/docs/marketing/meta.json +20 -0
- package/content/docs/marketing/navbar.mdx +16 -0
- package/content/docs/marketing/newsletter-section.mdx +16 -0
- package/content/docs/marketing/post-list.mdx +32 -0
- package/content/docs/marketing/pricing-section.mdx +16 -0
- package/content/docs/marketing/stats-section.mdx +16 -0
- package/content/docs/marketing/steps-section.mdx +60 -0
- package/content/docs/marketing/team-section.mdx +16 -0
- package/content/docs/marketing/testimonials-section.mdx +16 -0
- package/content/docs/mechanics/carousel.mdx +42 -0
- package/content/docs/mechanics/index.mdx +11 -0
- package/content/docs/mechanics/meta.json +4 -0
- package/content/docs/mechanics/sortable.mdx +44 -0
- package/content/docs/meta.json +4 -0
- package/content/docs/motion/animated-swap.mdx +75 -0
- package/content/docs/motion/count-up.mdx +31 -0
- package/content/docs/motion/fade-in.mdx +34 -0
- package/content/docs/motion/index.mdx +12 -0
- package/content/docs/motion/meta.json +4 -0
- package/content/docs/motion/page-transition.mdx +29 -0
- package/content/docs/motion/stagger-children.mdx +31 -0
- package/content/docs/overlays/index.mdx +9 -0
- package/content/docs/overlays/meta.json +4 -0
- package/content/docs/overlays/overlay.mdx +60 -0
- package/content/docs/overlays/underlay.mdx +56 -0
- package/dist/email/index.d.ts +8 -1
- package/dist/email/index.js +3 -3
- package/dist/email/index.js.map +1 -1
- package/docs-manifest.json +253 -0
- package/package.json +16 -8
- package/site/demos/action-email.tsx +6 -0
- package/site/demos/activity-feed.tsx +42 -0
- package/site/demos/animated-swap.tsx +42 -0
- package/site/demos/app-shell.tsx +47 -0
- package/site/demos/app-ui-page.tsx +9 -0
- package/site/demos/application-sidebar-block.tsx +9 -0
- package/site/demos/auth-section.tsx +15 -0
- package/site/demos/auth-split-block.tsx +9 -0
- package/site/demos/billing-page.tsx +157 -0
- package/site/demos/billing-panel.tsx +26 -0
- package/site/demos/carousel.tsx +34 -0
- package/site/demos/chart.tsx +55 -0
- package/site/demos/command-menu.tsx +39 -0
- package/site/demos/confirm-dialog.tsx +27 -0
- package/site/demos/contact-form-block.tsx +3 -0
- package/site/demos/contact-section.tsx +2 -0
- package/site/demos/context-menu.tsx +30 -0
- package/site/demos/count-up.tsx +23 -0
- package/site/demos/cta-section.tsx +6 -0
- package/site/demos/dashboard-overview-block.tsx +9 -0
- package/site/demos/dashboard-shell-block.tsx +10 -0
- package/site/demos/data-table.tsx +47 -0
- package/site/demos/demo-brand.tsx +23 -0
- package/site/demos/dock.tsx +20 -0
- package/site/demos/document-sidebar-block.tsx +9 -0
- package/site/demos/email-examples.tsx +58 -0
- package/site/demos/email-frame.tsx +50 -0
- package/site/demos/email-layout.tsx +6 -0
- package/site/demos/email-link-fallback.tsx +6 -0
- package/site/demos/email-previews.generated.ts +11 -0
- package/site/demos/empty-state-block.tsx +3 -0
- package/site/demos/empty-state.tsx +23 -0
- package/site/demos/error-page.tsx +5 -0
- package/site/demos/fade-in.tsx +18 -0
- package/site/demos/faq-section.tsx +6 -0
- package/site/demos/feature-card.tsx +13 -0
- package/site/demos/features-section.tsx +6 -0
- package/site/demos/file-upload.tsx +16 -0
- package/site/demos/footer.tsx +42 -0
- package/site/demos/full-page-spinner.tsx +9 -0
- package/site/demos/glass-card.tsx +14 -0
- package/site/demos/glow-effect.tsx +3 -0
- package/site/demos/gradient-background.tsx +3 -0
- package/site/demos/grid-pattern.tsx +3 -0
- package/site/demos/hero-section.tsx +6 -0
- package/site/demos/image-card.tsx +17 -0
- package/site/demos/login-block.tsx +9 -0
- package/site/demos/marketing-cta-block.tsx +3 -0
- package/site/demos/marketing-demo-data.tsx +114 -0
- package/site/demos/marketing-faq-block.tsx +3 -0
- package/site/demos/marketing-features-block.tsx +3 -0
- package/site/demos/marketing-footer-block.tsx +3 -0
- package/site/demos/marketing-hero-block.tsx +10 -0
- package/site/demos/marketing-nav-block.tsx +3 -0
- package/site/demos/marketing-newsletter-block.tsx +3 -0
- package/site/demos/marketing-page.tsx +52 -0
- package/site/demos/marketing-pricing-block.tsx +3 -0
- package/site/demos/marketing-stats-block.tsx +3 -0
- package/site/demos/marketing-team-block.tsx +3 -0
- package/site/demos/marketing-testimonials-block.tsx +3 -0
- package/site/demos/navbar.tsx +32 -0
- package/site/demos/newsletter-section.tsx +2 -0
- package/site/demos/noise-overlay.tsx +3 -0
- package/site/demos/not-found-block.tsx +3 -0
- package/site/demos/notice-email.tsx +6 -0
- package/site/demos/notifications-popover.tsx +27 -0
- package/site/demos/notify.tsx +44 -0
- package/site/demos/olwiba-ui-context.tsx +51 -0
- package/site/demos/onboarding-block.tsx +3 -0
- package/site/demos/onboarding-wizard.tsx +43 -0
- package/site/demos/overlay.tsx +72 -0
- package/site/demos/page-header.tsx +15 -0
- package/site/demos/page-transition.tsx +34 -0
- package/site/demos/post-list.tsx +24 -0
- package/site/demos/pricing-card.tsx +27 -0
- package/site/demos/pricing-section.tsx +6 -0
- package/site/demos/register-hotkeys.tsx +39 -0
- package/site/demos/root-error-fallback.tsx +28 -0
- package/site/demos/settings-layout-block.tsx +3 -0
- package/site/demos/settings-section.tsx +22 -0
- package/site/demos/sign-in-page.tsx +10 -0
- package/site/demos/sortable.tsx +30 -0
- package/site/demos/spotlight.tsx +29 -0
- package/site/demos/stagger-children.tsx +16 -0
- package/site/demos/stat-card.tsx +12 -0
- package/site/demos/stats-section.tsx +6 -0
- package/site/demos/steps-section.tsx +66 -0
- package/site/demos/suspensed.tsx +31 -0
- package/site/demos/team-members-panel.tsx +26 -0
- package/site/demos/team-section.tsx +2 -0
- package/site/demos/testimonial-card.tsx +17 -0
- package/site/demos/testimonials-section.tsx +6 -0
- package/site/demos/theme-color-updater.tsx +32 -0
- package/site/demos/theme-switch-minimal.tsx +10 -0
- package/site/demos/underlay.tsx +74 -0
- package/site/demos/update-banner.tsx +31 -0
- package/site/demos/use-copy-to-clipboard.tsx +21 -0
- package/site/demos/use-debounce.tsx +25 -0
- package/site/demos/use-intersection-observer.tsx +32 -0
- package/site/demos/use-local-storage.tsx +22 -0
- package/site/demos/use-media-query.tsx +31 -0
- package/site/demos/use-pagination.tsx +31 -0
- package/site/demos/user-profile-block.tsx +3 -0
- package/site/demos/version-banner.tsx +27 -0
- package/src/email/EmailLinkFallback.tsx +7 -1
- package/src/email/index.ts +3 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: useIntersectionObserver
|
|
3
|
+
description: Returns a ref and a boolean for scroll-triggered visibility detection.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<div className="flex flex-col md:flex-row items-center justify-start gap-2 mb-2">
|
|
7
|
+
<CopyCommandButton command="bun add @olwiba/ui" />
|
|
8
|
+
</div>
|
|
9
|
+
|
|
10
|
+
<Sandbox id="use-intersection-observer" />
|
|
11
|
+
|
|
12
|
+
## Installation
|
|
13
|
+
|
|
14
|
+
```sh
|
|
15
|
+
bun add @olwiba/ui
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Usage
|
|
19
|
+
|
|
20
|
+
```tsx
|
|
21
|
+
import { useIntersectionObserver } from "@olwiba/ui";
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## API Reference
|
|
25
|
+
|
|
26
|
+
<APIReference name="useIntersectionObserver" props={[]} />
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: useLocalStorage
|
|
3
|
+
description: Persisted state backed by localStorage with SSR safety.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<div className="flex flex-col md:flex-row items-center justify-start gap-2 mb-2">
|
|
7
|
+
<CopyCommandButton command="bun add @olwiba/ui" />
|
|
8
|
+
</div>
|
|
9
|
+
|
|
10
|
+
<Sandbox id="use-local-storage" />
|
|
11
|
+
|
|
12
|
+
## Installation
|
|
13
|
+
|
|
14
|
+
```sh
|
|
15
|
+
bun add @olwiba/ui
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Usage
|
|
19
|
+
|
|
20
|
+
```tsx
|
|
21
|
+
import { useLocalStorage } from "@olwiba/ui";
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## API Reference
|
|
25
|
+
|
|
26
|
+
<APIReference name="useLocalStorage" props={[]} />
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: useMediaQuery
|
|
3
|
+
description: Returns true/false for any CSS media query string.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<div className="flex flex-col md:flex-row items-center justify-start gap-2 mb-2">
|
|
7
|
+
<CopyCommandButton command="bun add @olwiba/ui" />
|
|
8
|
+
</div>
|
|
9
|
+
|
|
10
|
+
<Sandbox id="use-media-query" />
|
|
11
|
+
|
|
12
|
+
## Installation
|
|
13
|
+
|
|
14
|
+
```sh
|
|
15
|
+
bun add @olwiba/ui
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Usage
|
|
19
|
+
|
|
20
|
+
```tsx
|
|
21
|
+
import { useMediaQuery } from "@olwiba/ui";
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## API Reference
|
|
25
|
+
|
|
26
|
+
<APIReference name="useMediaQuery" props={[]} />
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: useMounted
|
|
3
|
+
description: Detect when the component has mounted on the client.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<div className="flex flex-col md:flex-row items-center justify-start gap-2 mb-2">
|
|
7
|
+
<CopyCommandButton command="bun add @olwiba/ui" />
|
|
8
|
+
</div>
|
|
9
|
+
|
|
10
|
+
## Installation
|
|
11
|
+
|
|
12
|
+
```sh
|
|
13
|
+
bun add @olwiba/ui
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Usage
|
|
17
|
+
|
|
18
|
+
```tsx
|
|
19
|
+
import { useMounted } from "@olwiba/ui";
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
```tsx
|
|
23
|
+
function MyComponent() {
|
|
24
|
+
const mounted = useMounted();
|
|
25
|
+
|
|
26
|
+
if (!mounted) return <div>Loading...</div>;
|
|
27
|
+
|
|
28
|
+
// Safe to access browser APIs after mount
|
|
29
|
+
return <div>Window width: {window.innerWidth}px</div>;
|
|
30
|
+
}
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Useful for SSR hydration mismatches, safely accessing `window`/`document`, and triggering entrance animations after mount.
|
|
34
|
+
|
|
35
|
+
## API Reference
|
|
36
|
+
|
|
37
|
+
<APIReference name="useMounted → returns" props={[
|
|
38
|
+
{ name: "mounted", type: "boolean", default: "false" },
|
|
39
|
+
]} />
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: usePagination
|
|
3
|
+
description: Page and offset state management — pairs with data tables and lists.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<div className="flex flex-col md:flex-row items-center justify-start gap-2 mb-2">
|
|
7
|
+
<CopyCommandButton command="bun add @olwiba/ui" />
|
|
8
|
+
</div>
|
|
9
|
+
|
|
10
|
+
<Sandbox id="use-pagination" />
|
|
11
|
+
|
|
12
|
+
## Installation
|
|
13
|
+
|
|
14
|
+
```sh
|
|
15
|
+
bun add @olwiba/ui
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Usage
|
|
19
|
+
|
|
20
|
+
```tsx
|
|
21
|
+
import { usePagination } from "@olwiba/ui";
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## API Reference
|
|
25
|
+
|
|
26
|
+
<APIReference name="usePagination" props={[]} />
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: useScrolledPast
|
|
3
|
+
description: Returns true when the page has scrolled past a given Y threshold in pixels.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<div className="flex flex-col md:flex-row items-center justify-start gap-2 mb-2">
|
|
7
|
+
<CopyCommandButton command="bun add @olwiba/ui" />
|
|
8
|
+
</div>
|
|
9
|
+
|
|
10
|
+
## Installation
|
|
11
|
+
|
|
12
|
+
```sh
|
|
13
|
+
bun add @olwiba/ui
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Usage
|
|
17
|
+
|
|
18
|
+
```tsx
|
|
19
|
+
import { useScrolledPast } from "@olwiba/ui";
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
```tsx
|
|
23
|
+
function StickyHeader() {
|
|
24
|
+
const scrolledPast = useScrolledPast(100);
|
|
25
|
+
|
|
26
|
+
return (
|
|
27
|
+
<header className={scrolledPast ? 'shadow-md bg-background' : 'bg-transparent'}>
|
|
28
|
+
...
|
|
29
|
+
</header>
|
|
30
|
+
);
|
|
31
|
+
}
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Uses a passive scroll listener — no impact on scroll performance. Fires immediately on mount and cleans up on unmount.
|
|
35
|
+
|
|
36
|
+
## API Reference
|
|
37
|
+
|
|
38
|
+
<APIReference name="useScrolledPast" props={[
|
|
39
|
+
{ name: "threshold", type: "number", default: "-" },
|
|
40
|
+
]} />
|
|
41
|
+
|
|
42
|
+
<APIReference name="useScrolledPast → returns" props={[
|
|
43
|
+
{ name: "scrolledPast", type: "boolean", default: "false" },
|
|
44
|
+
]} />
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Get Started
|
|
3
|
+
description: App-level components, page sections, and hooks built on @olwiba/cn primitives.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## What is @olwiba/ui?
|
|
7
|
+
|
|
8
|
+
`@olwiba/ui` provides configured page sections, app shells, and hooks that extend `@olwiba/cn` primitives into reusable patterns. Think Tailwind UI — components organized by domain that you drop into your project and wire up.
|
|
9
|
+
|
|
10
|
+
## Package chain
|
|
11
|
+
|
|
12
|
+
1. **@olwiba/cn** — Base primitives (Button, Card, Dialog, Sidebar, etc.)
|
|
13
|
+
2. **@olwiba/ui** — Configured sections, shells, motion, and hooks built on CN
|
|
14
|
+
|
|
15
|
+
## Installation
|
|
16
|
+
|
|
17
|
+
<CopyCommandButton command="bun add @olwiba/ui @olwiba/cn" />
|
|
18
|
+
|
|
19
|
+
```toml
|
|
20
|
+
# bunfig.toml
|
|
21
|
+
[install.scopes]
|
|
22
|
+
"@olwiba" = { url = "https://npm.olwiba.com/", token = "..." }
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Quick start
|
|
26
|
+
|
|
27
|
+
```tsx
|
|
28
|
+
import { OlwibaUIProvider, AppShell } from "@olwiba/ui";
|
|
29
|
+
|
|
30
|
+
export function Root() {
|
|
31
|
+
return (
|
|
32
|
+
<OlwibaUIProvider>
|
|
33
|
+
<AppShell
|
|
34
|
+
brand={{ name: "My App", href: "/" }}
|
|
35
|
+
navItems={[{ icon: LayoutDashboard, label: "Dashboard", href: "/dashboard" }]}
|
|
36
|
+
user={{ email: "user@example.com", onSignOut: () => signOut() }}
|
|
37
|
+
>
|
|
38
|
+
<Outlet />
|
|
39
|
+
</AppShell>
|
|
40
|
+
</OlwibaUIProvider>
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## What's included
|
|
46
|
+
|
|
47
|
+
### App UI
|
|
48
|
+
Shells and screens for application UIs — `AppShell`, `AuthSection`, `EmptyState`, `ErrorPage`.
|
|
49
|
+
|
|
50
|
+
### Marketing
|
|
51
|
+
Page sections and navigation for marketing sites — `HeroSection`, `FeaturesSection`, `PricingSection`, `Navbar`, `Footer`, and more.
|
|
52
|
+
|
|
53
|
+
### Overlays
|
|
54
|
+
Background treatments — `Backdrop` with mesh, radial, aurora, grid, noise, and glow variants.
|
|
55
|
+
|
|
56
|
+
### Motion
|
|
57
|
+
Animation primitives — `FadeIn`, `StaggerChildren`, `CountUp`, `PageTransition`.
|
|
58
|
+
|
|
59
|
+
### Components
|
|
60
|
+
Smaller interactive and card components — `Spotlight`, `Dock`, `ConfirmDialog`, card variants, utility components.
|
|
61
|
+
|
|
62
|
+
### Hooks
|
|
63
|
+
`useMounted`, `useConfirm`, `useControlledOpen`, `useCopyToClipboard`, `useDebounce`, `useIntersectionObserver`, `useLocalStorage`, `useMediaQuery`, `usePagination`, `useScrolledPast`.
|
|
64
|
+
|
|
65
|
+
## Something not right?
|
|
66
|
+
|
|
67
|
+
- 🪲 [Report a bug](https://github.com/Olwiba/olwibaUI/issues/new?template=bug_report.md)
|
|
68
|
+
- ✨ [Request a feature](https://github.com/Olwiba/olwibaUI/issues/new?template=feature_request.md)
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: ContactSection
|
|
3
|
+
description: Contact form section for marketing pages.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<div className="flex flex-col md:flex-row items-center justify-start gap-2 mb-2">
|
|
7
|
+
<CopyCommandButton command="bun add @olwiba/ui" />
|
|
8
|
+
</div>
|
|
9
|
+
|
|
10
|
+
<Sandbox id="contact-section" shellPreview />
|
|
11
|
+
|
|
12
|
+
## Usage
|
|
13
|
+
|
|
14
|
+
```tsx
|
|
15
|
+
import { ContactSection } from "@olwiba/ui";
|
|
16
|
+
```
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: CtaSection
|
|
3
|
+
description: Call-to-action band for marketing pages.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<div className="flex flex-col md:flex-row items-center justify-start gap-2 mb-2">
|
|
7
|
+
<CopyCommandButton command="bun add @olwiba/ui" />
|
|
8
|
+
</div>
|
|
9
|
+
|
|
10
|
+
<Sandbox id="cta-section" shellPreview />
|
|
11
|
+
|
|
12
|
+
## Usage
|
|
13
|
+
|
|
14
|
+
```tsx
|
|
15
|
+
import { CtaSection } from "@olwiba/ui";
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Variants
|
|
19
|
+
|
|
20
|
+
```tsx
|
|
21
|
+
// Default — badge icon, radial glow, primary + secondary CTAs
|
|
22
|
+
<CtaSection heading="Ready to ship?" description="Start free." primaryCta={{ label: "Get started", href: "/signup" }} />
|
|
23
|
+
|
|
24
|
+
// Showcase — large watermark icon with a scroll reveal, single pill CTA
|
|
25
|
+
<CtaSection
|
|
26
|
+
variant="showcase"
|
|
27
|
+
heading="Launch your next app"
|
|
28
|
+
primaryCta={{ label: "Start building", href: "/signup" }}
|
|
29
|
+
icon={<Rocket className="size-72" strokeWidth={0.75} />}
|
|
30
|
+
/>
|
|
31
|
+
```
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: FaqSection
|
|
3
|
+
description: Accordion FAQ section for marketing pages.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<div className="flex flex-col md:flex-row items-center justify-start gap-2 mb-2">
|
|
7
|
+
<CopyCommandButton command="bun add @olwiba/ui" />
|
|
8
|
+
</div>
|
|
9
|
+
|
|
10
|
+
<Sandbox id="faq-section" shellPreview />
|
|
11
|
+
|
|
12
|
+
## Usage
|
|
13
|
+
|
|
14
|
+
```tsx
|
|
15
|
+
import { FaqSection } from "@olwiba/ui";
|
|
16
|
+
```
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: FeaturesSection
|
|
3
|
+
description: Feature grid or list section for marketing pages.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<div className="flex flex-col md:flex-row items-center justify-start gap-2 mb-2">
|
|
7
|
+
<CopyCommandButton command="bun add @olwiba/ui" />
|
|
8
|
+
</div>
|
|
9
|
+
|
|
10
|
+
<Sandbox id="features-section" shellPreview />
|
|
11
|
+
|
|
12
|
+
## Usage
|
|
13
|
+
|
|
14
|
+
```tsx
|
|
15
|
+
import { FeaturesSection } from "@olwiba/ui";
|
|
16
|
+
|
|
17
|
+
<FeaturesSection features={features} />
|
|
18
|
+
|
|
19
|
+
// Horizontally scrolling cards instead of a grid
|
|
20
|
+
<FeaturesSection features={features} layout="carousel" />
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
`layout="carousel"` renders the same cards in a scroll-snap [Carousel](/docs/mechanics/carousel) with prev/next controls. To carousel your own content outside a section, use the `Carousel` mechanic directly.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Footer
|
|
3
|
+
description: Site footer with links and branding.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<div className="flex flex-col md:flex-row items-center justify-start gap-2 mb-2">
|
|
7
|
+
<CopyCommandButton command="bun add @olwiba/ui" />
|
|
8
|
+
</div>
|
|
9
|
+
|
|
10
|
+
<Sandbox id="footer" height={447} />
|
|
11
|
+
|
|
12
|
+
## Usage
|
|
13
|
+
|
|
14
|
+
```tsx
|
|
15
|
+
import { Footer } from "@olwiba/ui";
|
|
16
|
+
```
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: HeroSection
|
|
3
|
+
description: Above-the-fold hero section with headline, supporting copy, and CTA.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<div className="flex flex-col md:flex-row items-center justify-start gap-2 mb-2">
|
|
7
|
+
<CopyCommandButton command="bun add @olwiba/ui" />
|
|
8
|
+
</div>
|
|
9
|
+
|
|
10
|
+
<Sandbox id="hero-section" shellPreview />
|
|
11
|
+
|
|
12
|
+
## Usage
|
|
13
|
+
|
|
14
|
+
```tsx
|
|
15
|
+
import { HeroSection } from "@olwiba/ui";
|
|
16
|
+
```
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Marketing
|
|
3
|
+
description: Page sections and navigation components for marketing sites.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Drop-in sections for building marketing pages. Each component is self-contained — import the ones you need and compose them into a page.
|
|
7
|
+
|
|
8
|
+
| Component | Description |
|
|
9
|
+
|-----------|-------------|
|
|
10
|
+
| `Navbar` | Responsive top navigation bar |
|
|
11
|
+
| `Footer` | Site footer with links and branding |
|
|
12
|
+
| `HeroSection` | Above-the-fold hero with headline, CTA, and visual |
|
|
13
|
+
| `PostList` | Responsive post grid with balanced short-list defaults |
|
|
14
|
+
| `FeaturesSection` | Feature grid or list |
|
|
15
|
+
| `CtaSection` | Call-to-action band |
|
|
16
|
+
| `PricingSection` | Pricing cards with feature comparison |
|
|
17
|
+
| `TestimonialsSection` | Customer quotes |
|
|
18
|
+
| `TeamSection` | Team member grid |
|
|
19
|
+
| `FaqSection` | Accordion FAQ |
|
|
20
|
+
| `StatsSection` | Key metrics display |
|
|
21
|
+
| `NewsletterSection` | Email capture form |
|
|
22
|
+
| `ContactSection` | Contact form |
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"title": "Marketing",
|
|
3
|
+
"pages": [
|
|
4
|
+
"index",
|
|
5
|
+
"navbar",
|
|
6
|
+
"footer",
|
|
7
|
+
"hero-section",
|
|
8
|
+
"post-list",
|
|
9
|
+
"features-section",
|
|
10
|
+
"cta-section",
|
|
11
|
+
"pricing-section",
|
|
12
|
+
"testimonials-section",
|
|
13
|
+
"team-section",
|
|
14
|
+
"faq-section",
|
|
15
|
+
"stats-section",
|
|
16
|
+
"newsletter-section",
|
|
17
|
+
"contact-section",
|
|
18
|
+
"steps-section"
|
|
19
|
+
]
|
|
20
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Navbar
|
|
3
|
+
description: Responsive top navigation bar for marketing sites.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<div className="flex flex-col md:flex-row items-center justify-start gap-2 mb-2">
|
|
7
|
+
<CopyCommandButton command="bun add @olwiba/ui" />
|
|
8
|
+
</div>
|
|
9
|
+
|
|
10
|
+
<Sandbox id="navbar" shellPreview />
|
|
11
|
+
|
|
12
|
+
## Usage
|
|
13
|
+
|
|
14
|
+
```tsx
|
|
15
|
+
import { Navbar } from "@olwiba/ui";
|
|
16
|
+
```
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: NewsletterSection
|
|
3
|
+
description: Email capture form section for marketing pages.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<div className="flex flex-col md:flex-row items-center justify-start gap-2 mb-2">
|
|
7
|
+
<CopyCommandButton command="bun add @olwiba/ui" />
|
|
8
|
+
</div>
|
|
9
|
+
|
|
10
|
+
<Sandbox id="newsletter-section" shellPreview />
|
|
11
|
+
|
|
12
|
+
## Usage
|
|
13
|
+
|
|
14
|
+
```tsx
|
|
15
|
+
import { NewsletterSection } from "@olwiba/ui";
|
|
16
|
+
```
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: PostList
|
|
3
|
+
description: Responsive blog-post grid with balanced defaults for short collections.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<div className="flex flex-col md:flex-row items-center justify-start gap-2 mb-2">
|
|
7
|
+
<CopyCommandButton command="bun add @olwiba/ui" />
|
|
8
|
+
</div>
|
|
9
|
+
|
|
10
|
+
<Sandbox id="post-list" shellPreview />
|
|
11
|
+
|
|
12
|
+
## Usage
|
|
13
|
+
|
|
14
|
+
```tsx
|
|
15
|
+
import { PostList } from "@olwiba/ui";
|
|
16
|
+
|
|
17
|
+
<PostList posts={posts} />
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
`PostList` uses three columns for larger collections. One- and two-post collections are narrower and centered automatically, so a short list does not look like a partially empty grid.
|
|
21
|
+
|
|
22
|
+
Pass `columns={2}` or `columns={3}` when the surrounding page needs an explicit grid contract. An explicit `columns` value disables the automatic short-list width treatment; `className` remains available for page-specific sizing.
|
|
23
|
+
|
|
24
|
+
## API Reference
|
|
25
|
+
|
|
26
|
+
| Prop | Type | Default | Description |
|
|
27
|
+
|------|------|---------|-------------|
|
|
28
|
+
| `posts` | `PostCardProps[]` | — | Posts rendered as `PostCard` items. |
|
|
29
|
+
| `renderLink` | `AppShellRenderLink` | — | Optional router-aware link renderer. |
|
|
30
|
+
| `emptyMessage` | `string` | `"No posts published yet."` | Message shown for an empty collection. |
|
|
31
|
+
| `columns` | `2 \| 3` | Automatic | Explicit maximum column count. |
|
|
32
|
+
| `className` | `string` | — | Additional classes for the grid container. |
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: PricingSection
|
|
3
|
+
description: Pricing cards with plan details and feature comparison.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<div className="flex flex-col md:flex-row items-center justify-start gap-2 mb-2">
|
|
7
|
+
<CopyCommandButton command="bun add @olwiba/ui" />
|
|
8
|
+
</div>
|
|
9
|
+
|
|
10
|
+
<Sandbox id="pricing-section" shellPreview />
|
|
11
|
+
|
|
12
|
+
## Usage
|
|
13
|
+
|
|
14
|
+
```tsx
|
|
15
|
+
import { PricingSection } from "@olwiba/ui";
|
|
16
|
+
```
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: StatsSection
|
|
3
|
+
description: Key metrics display section for marketing pages.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<div className="flex flex-col md:flex-row items-center justify-start gap-2 mb-2">
|
|
7
|
+
<CopyCommandButton command="bun add @olwiba/ui" />
|
|
8
|
+
</div>
|
|
9
|
+
|
|
10
|
+
<Sandbox id="stats-section" shellPreview />
|
|
11
|
+
|
|
12
|
+
## Usage
|
|
13
|
+
|
|
14
|
+
```tsx
|
|
15
|
+
import { StatsSection } from "@olwiba/ui";
|
|
16
|
+
```
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: StepsSection
|
|
3
|
+
description: How-it-works steps — horizontal row by default, or a numbered vertical timeline with a fading accent line.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<div className="flex flex-col md:flex-row items-center justify-start gap-2 mb-2">
|
|
7
|
+
<CopyCommandButton command="bun add @olwiba/ui" />
|
|
8
|
+
</div>
|
|
9
|
+
|
|
10
|
+
<Sandbox id="steps-section" shellPreview />
|
|
11
|
+
|
|
12
|
+
## Usage
|
|
13
|
+
|
|
14
|
+
Default variant — horizontal on desktop, vertical on mobile:
|
|
15
|
+
|
|
16
|
+
```tsx
|
|
17
|
+
import { StepsSection } from "@olwiba/ui";
|
|
18
|
+
|
|
19
|
+
<StepsSection
|
|
20
|
+
title="From zero to shipped"
|
|
21
|
+
steps={[
|
|
22
|
+
{ emoji: "✍️", title: "Sign up", description: "Create an account in seconds." },
|
|
23
|
+
{ emoji: "🚀", title: "Ship", description: "Go live with confidence." },
|
|
24
|
+
]}
|
|
25
|
+
/>
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Timeline variant — numbered circles on a vertical accent line whose ends fade out. Groups chain with interstitial content (the line fades out after a group and fades back in before the next), and numbering continues across groups:
|
|
29
|
+
|
|
30
|
+
```tsx
|
|
31
|
+
<StepsSection
|
|
32
|
+
variant="timeline"
|
|
33
|
+
title="Up and running in minutes"
|
|
34
|
+
groups={[
|
|
35
|
+
{
|
|
36
|
+
steps: [
|
|
37
|
+
{ title: "Create your account", description: "Sign up with your email." },
|
|
38
|
+
{ title: "Add your first monitor", description: <>Send <code>!bot start</code> to activate.</> },
|
|
39
|
+
],
|
|
40
|
+
after: <CtaCard />,
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
steps: [{ title: "Found what you needed?", description: "Cancel anytime." }],
|
|
44
|
+
},
|
|
45
|
+
]}
|
|
46
|
+
/>
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Step descriptions are `ReactNode` — code chips, forms, and demo cards all work inline.
|
|
50
|
+
|
|
51
|
+
## API Reference
|
|
52
|
+
|
|
53
|
+
<APIReference name="StepsSection" props={[
|
|
54
|
+
{ name: "steps", type: "StepItem[]", description: "Steps for the default variant (or a single timeline group)." },
|
|
55
|
+
{ name: "variant", type: '"default" | "timeline"', default: '"default"', description: "Layout variant." },
|
|
56
|
+
{ name: "groups", type: "StepGroup[]", description: "Timeline only — step groups with optional `after` content; overrides steps." },
|
|
57
|
+
{ name: "badge", type: "string", default: '"How it works"', description: "Badge above the title." },
|
|
58
|
+
{ name: "title", type: "string", default: '"From zero to shipped"', description: "Section heading." },
|
|
59
|
+
{ name: "description", type: "string", description: "Copy under the heading." },
|
|
60
|
+
]} />
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: TeamSection
|
|
3
|
+
description: Team member grid for about and marketing pages.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<div className="flex flex-col md:flex-row items-center justify-start gap-2 mb-2">
|
|
7
|
+
<CopyCommandButton command="bun add @olwiba/ui" />
|
|
8
|
+
</div>
|
|
9
|
+
|
|
10
|
+
<Sandbox id="team-section" shellPreview />
|
|
11
|
+
|
|
12
|
+
## Usage
|
|
13
|
+
|
|
14
|
+
```tsx
|
|
15
|
+
import { TeamSection } from "@olwiba/ui";
|
|
16
|
+
```
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: TestimonialsSection
|
|
3
|
+
description: Customer quote grid for marketing pages.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<div className="flex flex-col md:flex-row items-center justify-start gap-2 mb-2">
|
|
7
|
+
<CopyCommandButton command="bun add @olwiba/ui" />
|
|
8
|
+
</div>
|
|
9
|
+
|
|
10
|
+
<Sandbox id="testimonials-section" shellPreview />
|
|
11
|
+
|
|
12
|
+
## Usage
|
|
13
|
+
|
|
14
|
+
```tsx
|
|
15
|
+
import { TestimonialsSection } from "@olwiba/ui";
|
|
16
|
+
```
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Carousel
|
|
3
|
+
description: Scroll-snap carousel behavior — wrap any children in a horizontal track with prev/next controls.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<div className="flex flex-col md:flex-row items-center justify-start gap-2 mb-2">
|
|
7
|
+
<CopyCommandButton command="bun add @olwiba/ui" />
|
|
8
|
+
</div>
|
|
9
|
+
|
|
10
|
+
<Sandbox id="carousel" />
|
|
11
|
+
|
|
12
|
+
## Installation
|
|
13
|
+
|
|
14
|
+
```sh
|
|
15
|
+
bun add @olwiba/ui
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Usage
|
|
19
|
+
|
|
20
|
+
```tsx
|
|
21
|
+
import { Carousel, FeatureCard } from "@olwiba/ui";
|
|
22
|
+
|
|
23
|
+
<Carousel ariaLabel="Platform features">
|
|
24
|
+
{features.map((f) => (
|
|
25
|
+
<FeatureCard key={f.title} icon={f.icon} title={f.title} description={f.description} />
|
|
26
|
+
))}
|
|
27
|
+
</Carousel>
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Carousel is a mechanic, not a section — each child becomes one snap slide, so feed it cards, images, or whole blocks. Control slide width with `itemClassName`:
|
|
31
|
+
|
|
32
|
+
```tsx
|
|
33
|
+
<Carousel itemClassName="w-[220px]">
|
|
34
|
+
{screenshots.map((s) => <ImageCard key={s.id} src={s.src} alt={s.alt} />)}
|
|
35
|
+
</Carousel>
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
For a ready-made feature carousel inside a marketing section, use `FeaturesSection` with `layout="carousel"` instead.
|
|
39
|
+
|
|
40
|
+
## API Reference
|
|
41
|
+
|
|
42
|
+
<APIReference name="Carousel" props={[]} />
|