Files
Find, open, and organize workspace files. Sharing a file never changes who owns it.
- Q3 board deck.pdf
- Supplier contracts
- Customer interviews – October.docx
- Launch checklist.xlsx
- Brand guidelines v4 final final.pdf
The padded column that holds a page's header and sections. It gives every page the same edges and the same space between blocks.
pnpm dlx shadcn@latest add https://sprout.tulipfarm.ai/r/page-content.jsonCopies Page Content into your app, installs the packages, and adds the styles. Then import it from @/components/ui/page-content. Needs Tailwind CSS 4 and a components.json from shadcn init.
Install the following dependencies:
pnpm add clsx tailwind-mergeAdd Sprout base once per app: the cn() helper and the design tokens.
lib/sprout/classes.tsCopy and paste the following code into your project.
import type { ComponentProps } from 'react';
import { cn } from '@/lib/sprout/classes';
export type PageContentProps = ComponentProps<'div'>;
export function PageContent({ className, ...props }: PageContentProps) {
return <div data-slot="page-content" className={cn('sprout-page-content', className)} {...props} />;
}Add the styles to your global CSS, after @import "tailwindcss".
@layer components {
.sprout-page-content {
--sprout-page-content-inline: 1rem;
--sprout-page-content-block: 1rem;
--sprout-page-content-gap: 1rem;
box-sizing: border-box;
width: 100%;
min-width: 0;
padding: var(--sprout-page-content-block) var(--sprout-page-content-inline);
}
:where(.sprout-page-content > :not(:last-child)) {
margin-block-end: var(--sprout-page-content-gap);
}
@media (width >= 40rem) {
.sprout-page-content {
--sprout-page-content-inline: 1.5rem;
--sprout-page-content-block: 1.25rem;
}
}
}Import it from @/components/ui/page-content. Update the paths if your @/ alias points elsewhere.
pnpm add @tulipfarm/sprout@import "tailwindcss";
@import "@tulipfarm/sprout/styles.css";The package keeps the source and ships fixes with each release. Import from @tulipfarm/sprout/page-content.
Find, open, and organize workspace files. Sharing a file never changes who owns it.
import { PageContent } from "@tulipfarm/sprout/page-content";
import { PageHeader } from "@tulipfarm/sprout/page-header";
<div className="min-h-0 flex-1 overflow-auto">
<PageContent>
<PageHeader title="Usage" description="Credits, and where they go." />
<WorkspaceCredits />
</PageContent>
</div>PageContent fills the width and never forces its parent wider (min-width: 0). Padding is 16px on small screens and 24px left and right, 20px top and bottom from 640px. Direct children sit 16px apart. Hidden children, such as a hidden file input, and children that render nothing add no space.
It does not scroll. Put it in your own scroll region, usually a min-h-0 flex-1 overflow-auto column under the app header. It takes every div prop, includingref and className.
// Room under the list for a floating composer
<div role="region" aria-label="Chat list" className="min-h-0 flex-1 overflow-y-auto pb-24">
<PageContent>…</PageContent>
</div>
// Keep the scroller in a ref to save and restore its position
<div ref={scroller} data-scroll-restoration-id="files-library" className="min-h-0 flex-1 overflow-y-auto">
<PageContent>…</PageContent>
</div>
// A rail that scrolls edge to edge on small screens
<nav className="-mx-[var(--sprout-page-content-inline)] px-[var(--sprout-page-content-inline)] overflow-x-auto">…</nav>The current padding is on --sprout-page-content-inline and --sprout-page-content-block; the gap is --sprout-page-content-gap. Children can read these to bleed to the edge. Spacing has zero specificity, so a child's own margin class wins.
Only you can see these chats. Most recently active first.
Find, open, and organize workspace files. Sharing a file never changes who owns it.
Every Monday at 9:00 · 4 steps · Last run succeeded
Connect the apps your agents work in.
This is the real shared page content region.
Nested content inherits the standard page spacing.
PageContent is a plain div with no role and no motion. Give the scroll region a name with role="region" and aria-label when it is a landmark, and let the keyboard reach it with tabIndex={0} when it has no focusable content. The page's h1 comes from PageHeader. Routing and data in these examples are sample code.