Tearsheet
The wide desktop modal that tears up from the bottom edge — with a side rail for multi-step flows, it stages whole tasks on one surface.
Real scenarios
The component as it is used in a product — not a specimen grid.
A whole task, one surface
The tearsheet tears up from the bottom edge of the window over a half scrim, with the influencer rail walking the three steps. The primary action turns into «Finish» on the last step; Escape, the scrim and Cancel all fold it back down.
Add storage
A new volume attaches to the app service without a restart; billing starts when data lands.
- Volume name
- Size
- GB
- Region
- Monthly cost
- €
Volume attached — the tearsheet folded back down and the console is exactly where you left it.
The whole family
Wide with a rail, narrow for a single decision, and rail-less for short flows — all three tear from the same bottom edge.
Important props
| Prop | Type | Default | What it does |
|---|---|---|---|
| open | boolean | false | Tears up from the bottom edge on the 240ms productive curve; Escape and the scrim close it too. |
| influencer | slot | null | The fixed-width side rail for step navigation; Carbon’s Progress Indicator lives inside it. |
| actions | footer | 'primary · secondary' | The base bar with a primary and secondary action; the primary turns into “Finish” on the last step. |
Snippet
<div class="cbts" data-open="false">
<div class="cbts-scrim"></div>
<section class="cbts-sheet" role="dialog" aria-label="Add storage">
<aside class="cbts-rail">
<ol><li data-current>Storage details</li><li>Choose a region</li><li>Review</li></ol>
</aside>
<div class="cbts-body"> … </div>
<footer class="cbts-footer">
<button data-primary>Next</button>
<button>Cancel</button>
</footer>
</section>
</div>
<style>
.cbts { position: relative; overflow: clip; }
.cbts-scrim { position: absolute; inset: 0; background: rgba(22,22,22,.5); }
.cbts-sheet { position: absolute; inset-inline: 3rem; inset-block-end: 0; block-size: calc(100% - 3rem);
background: #f4f4f4; display: grid; grid-template-columns: 16rem 1fr; grid-template-rows: 1fr auto; }
.cbts[data-open='false'] .cbts-sheet { translate: 0 100%; }
.cbts-sheet { transition: translate .24s cubic-bezier(.2, 0, 0, 1); }
</style>
// app/Pages/Storage.jsx — Inertia page; renders the React snippet
// below unchanged, with Inertia's Link wired into the provider.
import { Link } from '@inertiajs/react';
import { NabuXUIProvider } from '@nabuxai/ui-react';
import StorageTearsheet from '@/components/StorageTearsheet';
export default function Storage() {
return (
<NabuXUIProvider locale="en" linkComponent={Link}>
<main className="nx-page">
<StorageTearsheet />
</main>
</NabuXUIProvider>
);
}
// StorageTearsheet.jsx — Carbon tearsheet: tears up from the bottom, rail on the side
import { useEffect, useState } from 'react';
import '@nabuxai/ui-core/css';
const STEPS = ['Storage details', 'Choose region', 'Review'];
export default function StorageTearsheet() {
const [open, setOpen] = useState(false);
const [step, setStep] = useState(0);
// Escape closes — like the scrim and Cancel.
useEffect(() => {
const onKey = (e) => e.key === 'Escape' && setOpen(false);
window.addEventListener('keydown', onKey);
return () => window.removeEventListener('keydown', onKey);
}, []);
return (
<>
<style>{`
.cbts { position: relative; overflow: clip; min-block-size: 20rem; padding: 1rem;
border: 1px solid #8d8d8d; background: #fff;
font: 400 .875rem/1.4 'IBM Plex Sans', sans-serif; }
.cbts-open { block-size: 2.5rem; padding-inline: 1rem; border: none; background: #0f62fe;
color: #fff; cursor: pointer; }
.cbts-scrim { position: absolute; inset: 0; z-index: 8; background: rgba(22, 22, 22, .5); cursor: pointer; }
.cbts-sheet { position: absolute; z-index: 9; inset-inline: 2rem; inset-block-end: 0;
block-size: calc(100% - 2rem); display: grid; grid-template-columns: 12rem 1fr;
grid-template-rows: 1fr auto; background: #f4f4f4;
box-shadow: 0 -2px 14px rgba(0, 0, 0, .35);
animation: cbts-tear 240ms cubic-bezier(.2, 0, 0, 1); }
@keyframes cbts-tear { from { translate: 0 100%; } }
.cbts-rail { grid-row: 1 / 3; padding: 1.5rem 1.25rem; border-inline-end: 1px solid #e0e0e0; }
.cbts-rail ol { margin: 0; padding: 0; list-style: none; }
.cbts-rail li { padding-block-end: 1rem; color: #525252; }
.cbts-rail li[data-state='current'] { color: #161616; font-weight: 600; }
.cbts-rail li[data-state='complete'] { color: #0f62fe; }
.cbts-main { padding: 1.5rem 2rem; }
.cbts-main h2 { margin: 0 0 .5rem; font: 400 1.25rem/1.25 'IBM Plex Sans', sans-serif; }
.cbts-footer { grid-column: 2; display: flex; gap: .75rem; padding: .875rem 2rem;
border-block-start: 1px solid #e0e0e0; }
.cbts-footer button { block-size: 2.5rem; padding-inline: 1rem; border: none; cursor: pointer; }
.cbts-footer [data-primary] { background: #0f62fe; color: #fff; }
.cbts-footer [data-secondary] { background: transparent; color: #161616;
box-shadow: inset 0 0 0 1px #8d8d8d; }
`}</style>
<div className="cbts">
<button type="button" className="cbts-open" onClick={() => { setOpen(true); setStep(0); }}>
Add storage
</button>
{open && (
<>
{/* The scrim and the sheet tear up together on the productive curve. */}
<div className="cbts-scrim" onClick={() => setOpen(false)} />
<section className="cbts-sheet" role="dialog" aria-label="Add storage">
<aside className="cbts-rail" aria-label="Steps">
<ol>
{STEPS.map((label, i) => (
<li key={label} data-state={i < step ? 'complete' : i === step ? 'current' : ''}>
{i < step ? '✓ ' : ''}{label}
</li>
))}
</ol>
</aside>
<div className="cbts-main">
<h2>{STEPS[step]}</h2>
{step === 0 && <p>Name the volume and pick its performance tier.</p>}
{step === 1 && <p>Frankfurt keeps latency to Berlin under 30ms.</p>}
{step === 2 && <p>250 GB · bronze tier · region eu-de-2.</p>}
</div>
<footer className="cbts-footer">
<button type="button" data-secondary onClick={() => setOpen(false)}>Cancel</button>
{/* The primary action turns into “Finish” on the last step. */}
<button type="button" data-primary
onClick={() => (step < 2 ? setStep(step + 1) : setOpen(false))}>
{step < 2 ? 'Next' : 'Finish'}
</button>
</footer>
</section>
</>
)}
</div>
</>
);
}
<!-- StorageTearsheet.vue — Carbon tearsheet: tears up from the bottom, rail on the side -->
<script setup lang="ts">
import { onBeforeUnmount, onMounted, ref } from 'vue';
import '@nabuxai/ui-core/css';
const steps = ['Storage details', 'Choose region', 'Review'];
const open = ref(false);
const step = ref(0);
const onKey = (e: KeyboardEvent) => { if (e.key === 'Escape') open.value = false; };
onMounted(() => window.addEventListener('keydown', onKey));
onBeforeUnmount(() => window.removeEventListener('keydown', onKey));
</script>
<template>
<div class="cbts">
<button type="button" class="cbts-open" @click="open = true; step = 0">Add storage</button>
<template v-if="open">
<!-- The scrim and the sheet tear up together on the productive curve. -->
<div class="cbts-scrim" @click="open = false" />
<section class="cbts-sheet" role="dialog" aria-label="Add storage">
<aside class="cbts-rail" aria-label="Steps">
<ol>
<li v-for="(label, i) in steps" :key="label"
:data-state="i < step ? 'complete' : i === step ? 'current' : ''">
{{ i < step ? '✓ ' : '' }}{{ label }}
</li>
</ol>
</aside>
<div class="cbts-main">
<h2>{{ steps[step] }}</h2>
<p v-if="step === 0">Name the volume and pick its performance tier.</p>
<p v-else-if="step === 1">Frankfurt keeps latency to Berlin under 30ms.</p>
<p v-else>250 GB · bronze tier · region eu-de-2.</p>
</div>
<footer class="cbts-footer">
<button type="button" data-secondary @click="open = false">Cancel</button>
<!-- The primary action turns into “Finish” on the last step. -->
<button type="button" data-primary @click="step < 2 ? step++ : (open = false)">
{{ step < 2 ? 'Next' : 'Finish' }}
</button>
</footer>
</section>
</template>
</div>
</template>
<style scoped>
.cbts { position: relative; overflow: clip; min-block-size: 20rem; padding: 1rem;
border: 1px solid #8d8d8d; background: #fff;
font: 400 .875rem/1.4 'IBM Plex Sans', sans-serif; }
.cbts-open { block-size: 2.5rem; padding-inline: 1rem; border: none; background: #0f62fe;
color: #fff; cursor: pointer; }
.cbts-scrim { position: absolute; inset: 0; z-index: 8; background: rgba(22, 22, 22, .5); cursor: pointer; }
.cbts-sheet { position: absolute; z-index: 9; inset-inline: 2rem; inset-block-end: 0;
block-size: calc(100% - 2rem); display: grid; grid-template-columns: 12rem 1fr;
grid-template-rows: 1fr auto; background: #f4f4f4;
box-shadow: 0 -2px 14px rgba(0, 0, 0, .35);
animation: cbts-tear 240ms cubic-bezier(.2, 0, 0, 1); }
@keyframes cbts-tear { from { translate: 0 100%; } }
.cbts-rail { grid-row: 1 / 3; padding: 1.5rem 1.25rem; border-inline-end: 1px solid #e0e0e0; }
.cbts-rail ol { margin: 0; padding: 0; list-style: none; }
.cbts-rail li { padding-block-end: 1rem; color: #525252; }
.cbts-rail li[data-state='current'] { color: #161616; font-weight: 600; }
.cbts-rail li[data-state='complete'] { color: #0f62fe; }
.cbts-main { padding: 1.5rem 2rem; }
.cbts-main h2 { margin: 0 0 .5rem; font: 400 1.25rem/1.25 'IBM Plex Sans', sans-serif; }
.cbts-footer { grid-column: 2; display: flex; gap: .75rem; padding: .875rem 2rem;
border-block-start: 1px solid #e0e0e0; }
.cbts-footer button { block-size: 2.5rem; padding-inline: 1rem; border: none; cursor: pointer; }
.cbts-footer [data-primary] { background: #0f62fe; color: #fff; }
.cbts-footer [data-secondary] { background: transparent; color: #161616;
box-shadow: inset 0 0 0 1px #8d8d8d; }
</style>
<!-- StorageTearsheet.svelte — Carbon tearsheet: tears up from the bottom, rail on the side -->
<script lang="ts">
import { onMount } from 'svelte';
import '@nabuxai/ui-core/css';
const steps = ['Storage details', 'Choose region', 'Review'];
let open = $state(false);
let step = $state(0);
onMount(() => {
const onKey = (e: KeyboardEvent) => { if (e.key === 'Escape') open = false; };
window.addEventListener('keydown', onKey);
return () => window.removeEventListener('keydown', onKey);
});
</script>
<div class="cbts">
<button type="button" class="cbts-open" onclick={() => { open = true; step = 0; }}>Add storage</button>
{#if open}
<!-- The scrim and the sheet tear up together on the productive curve. -->
<div class="cbts-scrim" onclick={() => (open = false)} aria-hidden="true"></div>
<section class="cbts-sheet" role="dialog" aria-label="Add storage">
<aside class="cbts-rail" aria-label="Steps">
<ol>
{#each steps as label, i (label)}
<li data-state={i < step ? 'complete' : i === step ? 'current' : ''}>
{i < step ? '✓ ' : ''}{label}
</li>
{/each}
</ol>
</aside>
<div class="cbts-main">
<h2>{steps[step]}</h2>
{#if step === 0}<p>Name the volume and pick its performance tier.</p>{/if}
{#if step === 1}<p>Frankfurt keeps latency to Berlin under 30ms.</p>{/if}
{#if step === 2}<p>250 GB · bronze tier · region eu-de-2.</p>{/if}
</div>
<footer class="cbts-footer">
<button type="button" data-secondary onclick={() => (open = false)}>Cancel</button>
<!-- The primary action turns into “Finish” on the last step. -->
<button type="button" data-primary onclick={() => (step < 2 ? step++ : (open = false))}>
{step < 2 ? 'Next' : 'Finish'}
</button>
</footer>
</section>
{/if}
</div>
<style>
.cbts { position: relative; overflow: clip; min-block-size: 20rem; padding: 1rem;
border: 1px solid #8d8d8d; background: #fff;
font: 400 .875rem/1.4 'IBM Plex Sans', sans-serif; }
.cbts-open { block-size: 2.5rem; padding-inline: 1rem; border: none; background: #0f62fe;
color: #fff; cursor: pointer; }
.cbts-scrim { position: absolute; inset: 0; z-index: 8; background: rgba(22, 22, 22, .5); cursor: pointer; }
.cbts-sheet { position: absolute; z-index: 9; inset-inline: 2rem; inset-block-end: 0;
block-size: calc(100% - 2rem); display: grid; grid-template-columns: 12rem 1fr;
grid-template-rows: 1fr auto; background: #f4f4f4;
box-shadow: 0 -2px 14px rgba(0, 0, 0, .35);
animation: cbts-tear 240ms cubic-bezier(.2, 0, 0, 1); }
@keyframes cbts-tear { from { translate: 0 100%; } }
.cbts-rail { grid-row: 1 / 3; padding: 1.5rem 1.25rem; border-inline-end: 1px solid #e0e0e0; }
.cbts-rail ol { margin: 0; padding: 0; list-style: none; }
.cbts-rail li { padding-block-end: 1rem; color: #525252; }
.cbts-rail li[data-state='current'] { color: #161616; font-weight: 600; }
.cbts-rail li[data-state='complete'] { color: #0f62fe; }
.cbts-main { padding: 1.5rem 2rem; }
.cbts-main h2 { margin: 0 0 .5rem; font: 400 1.25rem/1.25 'IBM Plex Sans', sans-serif; }
.cbts-footer { grid-column: 2; display: flex; gap: .75rem; padding: .875rem 2rem;
border-block-start: 1px solid #e0e0e0; }
.cbts-footer button { block-size: 2.5rem; padding-inline: 1rem; border: none; cursor: pointer; }
.cbts-footer [data-primary] { background: #0f62fe; color: #fff; }
.cbts-footer [data-secondary] { background: transparent; color: #161616;
box-shadow: inset 0 0 0 1px #8d8d8d; }
</style>