Page layout
One page shape: titled sections in a main column, and cards in a side column that sits beside it when the page's box has room for both, 840px, and under it at full width otherwise.
PageColumns sets the page's two columns inside the width the shell sets, so the content starts at the same place on every page. Each titled block in the main column is a Section, with one heading size and no surface. Each block in the side column is a RailCard, the small card with a heading.
Examples
Largest positions
| Holding | Value | Weight |
|---|---|---|
| Fenwick Semiconductor | $3.0B | 9.3% |
| Marlow Health | $2.0B | 6.2% |
| Oakline Energy | $1.8B | 5.6% |
| Kestrel Payments | $1.5B | 4.6% |
| Elmstead Foods | $1.2B | 3.7% |
Your profile
Maya Chen
Covers private credit funds at Juniper Ridge Advisers
People at your firm can see your name and your saved searches.
Edit profileUsage
Use it when
- A page has a main column and the user's own things beside it, such as their saved items, the funds they follow or this week's plan: PageColumns, with a Section for each titled block in the main column and a RailCard for each block in the rail.
- Every page of the product, so the content starts at the same place on each.
- A block in the main column has one place to go for the full list, or a control that changes what it shows: the Section's
actionandcontrols. - The same block appears in the rail of more than one page and must look the same on each: a RailCard.
Use something else when
- The page is a single form or a reading page with nothing for a rail. Use the shell's
mainwith a Section instead, and leave PageColumns off. - The page is a sign-in or an error page with one block in the middle. Use Empty inside the shell instead.
- Two things sit side by side inside the main column. Use a grid inside a Section instead; the rail belongs to the page.
- A block needs a surface in the main column, or a description, an action in its header, an image or a footer. Use Card instead, rendered as a section with an
h2. - The title names the whole page rather than one block. Use the shell's
h1instead; each block under it is a Section, or a Card when it needs a surface. - The control switches the whole block between views of the same data. Use Tabs instead, with the panels as the content.
- A rail block has nothing to show. Use Empty inside the rail card instead of leaving the card out, so the rail keeps its shape.
Rules
General
Content
Avoid
Limits
Install
npx shadcn@latest add https://kaanarici.com/r/cobalt/page-columns.json https://kaanarici.com/r/cobalt/section.json https://kaanarici.com/r/cobalt/rail-card.jsonimport { PageColumns } from "@/components/cobalt/ui/page-columns"import { Section } from "@/components/cobalt/ui/section"import { RailCard } from "@/components/cobalt/ui/rail-card"