Reading Panel
Install the component, then paste your configured usage. Your settings are included in the code below.
npx arclen-ui add reading-panel --settings eyJ0aGVtZSI6ImRhcmsiLCJiYWNrZ3JvdW5kIjoiZ3JhZGllbnQiLCJiYWNrZ3JvdW5kR2xvdyI6MTgsImZpbGwiOmZhbHNlLCJkYXJrR2xhc3NUaW50IjoiIzE3MTcxYSIsImRhcmtUaW50U3RyZW5ndGgiOjcwLCJkYXJrUmltQnJpZ2h0bmVzcyI6NTUsImRhcmtCZXZlbFdpZHRoIjo5LCJkYXJrQmV2ZWxUYXBlciI6MjQsImRhcmtUb29sYmFyVHJhbnNtaXNzaW9uIjo2OCwidGl0bGUiOiJBIG1hcmsgYmVsb3cgdGhlIHRpZGUiLCJwYXNzYWdlcyI6WyJBdCB0aGUgZmFyIGVuZCBvZiBBbGRlciBTdHJlZXQgdGhlcmUgaXMgYSBicmFzcyBuYWlsIGluIHRoZSBzZWF3YWxsLiBJdCBzaXRzIGF0IHRoZSBoZWlnaHQgb2YgbXkgc2hvdWxkZXIuIFNvbWVvbmUgY3V0IGEgc21hbGwgbGluZSBhY3Jvc3MgaXRzIGhlYWQsIHRoZW4gcGFpbnRlZCB0aGUgbGluZSB3aGl0ZSwgYW5kIGZvciBtb3N0IG9mIG15IGxpZmUgSSB0b29rIGl0IGZvciBhIGNhcnBlbnRlcuKAmXMgYWNjaWRlbnQuIiwiT25lIEZlYnJ1YXJ5IG1vcm5pbmcgSSBmb3VuZCBhIHdvbWFuIHdpdGggYSBmb2xkaW5nIHJ1bGUgc3RhbmRpbmcgYmVzaWRlIGl0LiBTaGUgd29yZSBhIHdvb2wgY2FwIHB1bGxlZCBvdmVyIGhlciBlYXJzLiBUaGUgY3VmZnMgb2YgaGVyIGNvYXQgd2VyZSB3ZXQuIFNoZSBoZWxkIG9uZSBlbmQgb2YgdGhlIHJ1bGUgYWdhaW5zdCB0aGUgbmFpbCBhbmQgbGV0IHRoZSBvdGhlciBlbmQgaGFuZyBkb3duIGludG8gdGhlIGhhcm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ldCI6MjQsIm9wZW5UZXh0U2l6ZSI6MTksIm9wZW5JY29uU2l6ZSI6MTUsImNsb3NlU2l6ZSI6NDIsImNsb3NlSWNvblNpemUiOjIxLCJjb250cm9sU3Ryb2tlIjoyLCJ0b29sYmFyV2lkdGgiOjI0MSwidG9vbGJhckhlaWdodCI6NDgsInRvb2xiYXJPZmZzZXQiOjIwLCJ0eXBlQnV0dG9uU2l6ZSI6MzgsIm1ldGVyV2lkdGgiOjc2LCJtZXRlckhlaWdodCI6NCwicHJvZ3Jlc3NTaXplIjoxMiwiYmFyQmFzZSI6IiNmZmZmZmYiLCJiYXJIaWdobGlnaHQiOiIjZjJmNWZhIiwiYmFyU2hpbmUiOjAsImJhclNoaW5lV2lkdGgiOjg4LCJiYXJBbmdsZSI6MTY1LCJvcGVuRHVyYXRpb24iOjU2MCwiY2xvc2VEdXJhdGlvbiI6NDIwLCJjaHJvbWVEZWxheSI6MTA1LCJzdG9yeURlbGF5Ijo3MCwibWFya2VyRHVyYXRpb24iOjE2NTAsInNlY3Rpb25MYWJlbCI6IkZpZWxkIG5vdGVib29rIiwibGlnaHRQYXBlciI6IiNmN2Y3ZjciLCJkYXJrUGFwZXIiOiIjMjQyNDI4IiwibGlnaHRJbmsiOiIjMjQyNDI3IiwiZGFya0luayI6IiNmNWYzZjAiLCJsaWdodFF1aWV0IjoiIzY0NjQ2OSIsImRhcmtRdWlldCI6IiNjMmJkYzQiLCJsaWdodEJhc2UiOiIjZDhkNWQ3IiwiZGFya0Jhc2UiOiIjMTQxMjE3IiwibGlnaHRNaXN0QSI6IiNmZmFkN2QiLCJkYXJrTWlzdEEiOiIjYTM0NDI4IiwibGlnaHRNaXN0QiI6IiNjNGE1ZjUiLCJkYXJrTWlzdEIiOiIjNjg0MThjIiwibGlnaHRNaXN0QyI6IiNmN2E5YzYiLCJkYXJrTWlzdEMiOiIjOTIzZjY4In0import { ReadingPanel } from "@/components/reading-panel";
export default function Example() {
return <ReadingPanel {...{
"theme": "dark",
"background": "gradient",
"backgroundGlow": 18,
"fill": false,
"darkGlassTint": "#17171a",
"darkTintStrength": 70,
"darkRimBrightness": 55,
"darkBevelWidth": 9,
"darkBevelTaper": 24,
"darkToolbarTransmission": 68,
"title": "A mark below the tide",
"passages": [
"At the far end of Alder Street there is a brass nail in the seawall. It sits at the height of my shoulder. Someone cut a small line across its head, then painted the line white, and for most of my life I took it for a carpenter’s accident.",
"One February morning I found a woman with a folding rule standing beside it. She wore a wool cap pulled over her ears. The cuffs of her coat were wet. She held one end of the rule against the nail and let the other end hang down into the harbour.",
"My mother kept this mark, she said. The way she said kept made the nail sound like a bird that needed feeding. She showed me a pocket ledger. Each page gave the day, the wind and the distance between the white line and the water. The earliest entries were in pencil, the rest in a cramped blue hand.",
"We walked down the steps to look at the boats. A strip of green weed along the sixth riser showed where the water had spent the morning. Below it, the granite turned the colour of a plucked plum. Above it, every grain of sand cast its own small shadow.",
"The woman drew a second line, lower on the page, and handed me the pencil. I wrote the time from my watch. Across the channel an empty ferry was making its first run. It put up a pale wave, which struck the wall and entered the ledger as a perfectly respectable mistake.",
"On the way home I began to see little gauges everywhere. On the bakery door a child’s height was marked with a pencil. A bus conductor had worn a hollow into the brass on his ticket machine. Even my own key had polished a bright track in the stone beside the lock.",
"A week later the folding rule was waiting on the wall. A scrap of paper caught under its hinge gave an hour and nothing else. I brought a flask of coffee and sat on the steps until the minute hand on my watch reached the mark.",
"The harbour was very quiet. A coot picked its way around a tangle of orange rope. Farther out, a man in a white boat pulled in a net so fine it disappeared whenever the sun came out. I held the rule still and waited for the water to come to rest.",
"It never quite did. Between the ferry and the breeze and the displacement of a single black bird there was always some small movement under the rule. I wrote two numbers down, one for the highest reading and one for the lowest.",
"When I next saw the woman she turned the ledger sideways to read my entry. My mother did that too, she said. She showed me the first page again. Between the faint pencil lines I could just make out the tiny vertical strokes that joined each pair of numbers.",
"I still go down on Sundays. There is a slot in the brickwork where the rule stays dry and the ledger fits inside my coat. Occasionally a passer-by stops to ask what we are measuring. I let them take the next reading. That is usually enough of an answer."
],
"byline": "Arclen Journal · Field notes",
"openLabel": "Read",
"glassMode": "refracted",
"glassStrength": 76,
"paperOpacity": 93,
"accent": "#496859",
"typeface": "geist-serif",
"fontSize": 19,
"lineHeight": 1.68,
"readerWidth": 680,
"motionSpeed": 1,
"cornerRadius": 40,
"paragraphSpacing": 1,
"readingMeasure": 576,
"coverWidth": 289,
"coverHeight": 290,
"coverTitleSize": 22.6,
"coverTitleWidth": 156,
"coverTitleTop": 24.5,
"excerptSize": 15.9,
"excerptLeading": 23,
"excerptInset": 23,
"coverBlur": 10,
"sheetBlur": 12,
"frostBlur": 4,
"frostSaturation": 1.35,
"rimStrength": 1,
"veilStrength": 1,
"coverTopFade": 104,
"coverBottomFade": 96,
"sheetHeight": 860,
"readerTopFade": 108,
"readerBottomFade": 120,
"headerTitleSize": 22.6,
"bylineSize": 12,
"bodyTopInset": 116,
"bodySideInset": 8,
"bodyBottomInset": 132,
"dropCapSize": 3,
"sectionLabelSize": 11,
"openWidth": 104,
"openHeight": 40,
"openOffset": 24,
"openTextSize": 19,
"openIconSize": 15,
"closeSize": 42,
"closeIconSize": 21,
"controlStroke": 2,
"toolbarWidth": 241,
"toolbarHeight": 48,
"toolbarOffset": 20,
"typeButtonSize": 38,
"meterWidth": 76,
"meterHeight": 4,
"progressSize": 12,
"barBase": "#ffffff",
"barHighlight": "#f2f5fa",
"barShine": 0,
"barShineWidth": 88,
"barAngle": 165,
"openDuration": 560,
"closeDuration": 420,
"chromeDelay": 105,
"storyDelay": 70,
"markerDuration": 1650,
"sectionLabel": "Field notebook",
"lightPaper": "#f7f7f7",
"darkPaper": "#242428",
"lightInk": "#242427",
"darkInk": "#f5f3f0",
"lightQuiet": "#646469",
"darkQuiet": "#c2bdc4",
"lightBase": "#d8d5d7",
"darkBase": "#141217",
"lightMistA": "#ffad7d",
"darkMistA": "#a34428",
"lightMistB": "#c4a5f5",
"darkMistB": "#68418c",
"lightMistC": "#f7a9c6",
"darkMistC": "#923f68"
}} />;
}| Property | Type | Default |
|---|---|---|
themeTheme Options: dark (Night), light (Day) | select | "light" |
backgroundBackground Options: gradient (Ember–violet gradient), coastal (Coastal dusk) | select | "gradient" |
backgroundGlowBackground glow strength (%) 0–100Step 1 | number | 18 |
fillFill container | boolean | false |
darkGlassTintGlass tint | color | "#17171a" |
darkTintStrengthTint strength (%) 0–100Step 1 | number | 70 |
darkRimBrightnessRim brightness (%) 0–100Step 1 | number | 55 |
darkBevelWidthSide bevel width (px) 0–24Step 0.5 | number | 9 |
darkBevelTaperCorner taper (%) 0–50Step 1 | number | 24 |
darkToolbarTransmissionToolbar text visibility (%) 0–100Step 1 | number | 68 |
titleArticle title Up to 100 characters | text | "A mark below the tide" |
passagesArticle paragraphs Minimum 1 itemsMaximum 64 itemsUp to 2400 characters per item | string-list | ["At the far end of Alder Street there is a brass nail in the seawall. It sits at the height of my shoulder. Someone cut a small line across its head, then painted the line white, and for most of my life I took it for a carpenter’s accident.","One February morning I found a woman with a folding rule standing beside it. She wore a wool cap pulled over her ears. The cuffs of her coat were wet. She held one end of the rule against the nail and let the other end hang down into the harbour.","My mother kept this mark, she said. The way she said kept made the nail sound like a bird that needed feeding. She showed me a pocket ledger. Each page gave the day, the wind and the distance between the white line and the water. The earliest entries were in pencil, the rest in a cramped blue hand.","We walked down the steps to look at the boats. A strip of green weed along the sixth riser showed where the water had spent the morning. Below it, the granite turned the colour of a plucked plum. Above it, every grain of sand cast its own small shadow.","The woman drew a second line, lower on the page, and handed me the pencil. I wrote the time from my watch. Across the channel an empty ferry was making its first run. It put up a pale wave, which struck the wall and entered the ledger as a perfectly respectable mistake.","On the way home I began to see little gauges everywhere. On the bakery door a child’s height was marked with a pencil. A bus conductor had worn a hollow into the brass on his ticket machine. Even my own key had polished a bright track in the stone beside the lock.","A week later the folding rule was waiting on the wall. A scrap of paper caught under its hinge gave an hour and nothing else. I brought a flask of coffee and sat on the steps until the minute hand on my watch reached the mark.","The harbour was very quiet. A coot picked its way around a tangle of orange rope. Farther out, a man in a white boat pulled in a net so fine it disappeared whenever the sun came out. I held the rule still and waited for the water to come to rest.","It never quite did. Between the ferry and the breeze and the displacement of a single black bird there was always some small movement under the rule. I wrote two numbers down, one for the highest reading and one for the lowest.","When I next saw the woman she turned the ledger sideways to read my entry. My mother did that too, she said. She showed me the first page again. Between the faint pencil lines I could just make out the tiny vertical strokes that joined each pair of numbers.","I still go down on Sundays. There is a slot in the brickwork where the rule stays dry and the ledger fits inside my coat. Occasionally a passer-by stops to ask what we are measuring. I let them take the next reading. That is usually enough of an answer."] |
bylineByline Up to 120 characters | text | "Arclen Journal · Field notes" |
openLabelOpen button Up to 18 characters | text | "Read" |
glassModeOptical treatment Options: refracted (Refracted), frosted (Frosted) | select | "refracted" |
glassStrengthLens intensity (%) 0–100Step 1 | number | 76 |
paperOpacityPaper opacity (%) 45–96Step 1 | number | 93 |
accentReading accent | color | "#496859" |
typefaceArticle typeface Options: geist-serif (Geist Serif), editorial (Editorial serif), book (Book serif), sans (Geist Sans) | select | "geist-serif" |
fontSizeReading size (px) 15–29Step 1 | number | 19 |
lineHeightLine height 1.35–2Step 0.01 | number | 1.68 |
readerWidthReader width (px) 340–820Step 10 | number | 680 |
motionSpeedMorph speed (×) 0.5–2Step 0.05 | number | 1 |
cornerRadiusPaper corner radius (px) 8–56Step 1 | number | 40 |
paragraphSpacingParagraph spacing (em) 0.25–2Step 0.05 | number | 1 |
readingMeasureText column limit (px) 260–700Step 4 | number | 576 |
coverWidthCover width (px) 220–420Step 1 | number | 289 |
coverHeightCover height (px) 240–440Step 1 | number | 290 |
coverTitleSizeCover title size (px) 16–32Step 0.1 | number | 22.6 |
coverTitleWidthCover title measure (px) 110–210Step 1 | number | 156 |
coverTitleTopCover title offset (px) 12–38Step 0.5 | number | 24.5 |
excerptSizeExcerpt type size (px) 12–22Step 0.1 | number | 15.9 |
excerptLeadingExcerpt line height (px) 20–34Step 1 | number | 23 |
excerptInsetExcerpt side padding (px) 12–42Step 1 | number | 23 |
coverBlurCover backdrop blur (px) 0–26Step 0.5 | number | 10 |
sheetBlurSheet backdrop blur (px) 0–30Step 0.5 | number | 12 |
frostBlurFrosted control blur (px) 0–18Step 0.5 | number | 4 |
frostSaturationFrosted control saturation (×) 0.5–2Step 0.05 | number | 1.35 |
rimStrengthGlass rim intensity (×) 0–1.5Step 0.05 | number | 1 |
veilStrengthEdge blur intensity (×) 0–2Step 0.05 | number | 1 |
coverTopFadeCover top fade height (px) 72–144Step 1 | number | 104 |
coverBottomFadeCover bottom fade height (px) 48–144Step 1 | number | 96 |
sheetHeightMaximum sheet height (px) 320–1100Step 10 | number | 860 |
readerTopFadeReader top fade height (px) 64–160Step 1 | number | 108 |
readerBottomFadeReader bottom fade height (px) 64–180Step 1 | number | 120 |
headerTitleSizeReader title size (px) 16–36Step 0.1 | number | 22.6 |
bylineSizeByline size (px) 10–18Step 0.5 | number | 12 |
bodyTopInsetArticle top padding (px) 84–164Step 1 | number | 116 |
bodySideInsetArticle side padding (%) 3–16Step 0.5 | number | 8 |
bodyBottomInsetArticle bottom padding (px) 80–190Step 1 | number | 132 |
dropCapSizeDrop cap size (em) 1–5Step 0.1 | number | 3 |
sectionLabelSizeSection label size (px) 9–16Step 0.5 | number | 11 |
openWidthOpen button width (px) 80–180Step 1 | number | 104 |
openHeightOpen button height (px) 32–62Step 1 | number | 40 |
openOffsetOpen button bottom inset (px) 10–52Step 1 | number | 24 |
openTextSizeOpen label size (px) 13–24Step 0.5 | number | 19 |
openIconSizeOpen arrow size (px) 12–22Step 1 | number | 15 |
closeSizeClose button size (px) 32–56Step 1 | number | 42 |
closeIconSizeClose icon size (px) 14–28Step 1 | number | 21 |
controlStrokeIcon stroke (px) 1–3Step 0.1 | number | 2 |
toolbarWidthToolbar width (px) 210–330Step 1 | number | 241 |
toolbarHeightToolbar height (px) 42–70Step 1 | number | 48 |
toolbarOffsetToolbar bottom inset (px) 10–44Step 1 | number | 20 |
typeButtonSizeType button size (px) 28–46Step 1 | number | 38 |
meterWidthProgress bar width (px) 32–112Step 1 | number | 76 |
meterHeightProgress bar height (px) 2–10Step 1 | number | 4 |
progressSizeProgress number size (px) 10–16Step 0.5 | number | 12 |
barBaseBase color | color | "#ffffff" |
barHighlightHighlight color | color | "#f2f5fa" |
barShineShine strength (%) 0–100Step 1 | number | 0 |
barShineWidthShine width (%) 4–100Step 1 | number | 88 |
barAngleGradient angle (°) 0–360Step 1 | number | 165 |
openDurationOpening duration (ms) 150–1000Step 5 | number | 560 |
closeDurationClosing duration (ms) 100–800Step 5 | number | 420 |
chromeDelayToolbar entrance delay (ms) 0–240Step 5 | number | 105 |
storyDelayArticle entrance delay (ms) 0–220Step 5 | number | 70 |
markerDurationPassage highlight time (ms) 0–3200Step 10 | number | 1650 |
sectionLabelArticle section label Up to 80 characters | text | "Field notebook" |
lightPaperPaper | color | "#f7f7f7" |
darkPaperPaper | color | "#242428" |
lightInkArticle ink | color | "#242427" |
darkInkArticle ink | color | "#f5f3f0" |
lightQuietByline ink | color | "#646469" |
darkQuietByline ink | color | "#c2bdc4" |
lightBaseStage background | color | "#d8d5d7" |
darkBaseStage background | color | "#141217" |
lightMistAEmber glow · left | color | "#ffad7d" |
darkMistAEmber glow · left | color | "#a34428" |
lightMistBViolet glow · right | color | "#c4a5f5" |
darkMistBViolet glow · right | color | "#68418c" |
lightMistCPink glow · lower | color | "#f7a9c6" |
darkMistCPink glow · lower | color | "#923f68" |
Reading Panel
Read the opening of “A mark below the tide,” an original field note, in a scrollable excerpt. Open the reader to reach a wider view with type controls and reading progress. The journal remembers the current passage as you switch views or change type size.
React
import { ReadingPanel } from './components/reading-panel';
export function Example() {
return <ReadingPanel theme="light" onOpenChange={open => console.log(open)} />;
}Supply your own article using title and a passages array of paragraphs. Use theme for the day or night palette. fill removes the outer width limit and takes up the height of a parent that sets one. className and style apply to the wrapper. paused closes the reader and temporarily disables its opener. Component aliases ReadingPanel.
Vanilla
import { mount } from './components/reading-panel/src/core';
import './components/reading-panel/src/styles.css';
const host = document.querySelector<HTMLElement>('#reading-panel')!;
const panel = mount(host, { theme: 'dark' }, undefined, {
onOpenChange(open) { console.log(open); },
});
panel.update({ fill: true });
// When removing the host:
panel.destroy();The bubbling reading-panel-open-change event carries the same boolean as the callback.
Reading and keyboard access
Open reader carries the excerpt’s visible sentence into the article. Focus moves to Close when the sheet has finished expanding. Press Tab to focus the article, then scroll with Page Up, Page Down or the arrow keys. Tab stays within the reader. Close with the header button, the backdrop, or Escape. Focus returns to Open reader. Choose the smaller or larger A to change type size while preserving the displayed reading percentage. The percentage measures the character at the reading line within the whole article. It reads 0% and 100% at the document boundaries. Rewrapping a paragraph changes its pixel position. The reader follows that same character when you resize the view or change the type.
The opening passage briefly receives a soft highlight. Reduced motion removes the opening and closing transitions and keeps the marker steady for the same interval. Browsers without backdrop blur use solid surfaces.
Set --rp-stage-height on the wrapper to set the available height. The compact card measures 289 × 290 px. The expanded sheet defaults to a maximum of 680 px wide and 860 px tall within that space. Three generated normal maps refract the toolbar and buttons.
Tuning the reader
Choose Night in the preview to tune the dark glass. **Dark glass** adjusts the tint color, tint strength, rim brightness and how much of the scrolling text is visible beneath the toolbar. On the expanded sheet, **Side bevel width** controls how far each reflection reaches inward (0–24 px, default 9 px). **Corner taper** sets the fraction of the sheet height used to fade each end (0–50%, default 24%). At 0% taper the sides stay evenly lit. At 0 px width the side reflections disappear. At 0% visibility the toolbar is opaque. At 100% it has a clear center and retains the selected rim.
Choose **General → Background → Coastal dusk** for a softly blurred coast at blue hour. The default is **Ember–violet gradient**. The packaged WebP fills the stage in both themes. Switching backgrounds preserves your place in the article.
backgroundGlow sets the backdrop glow strength in both themes. It defaults to 18 percent.
glassMode selects refracted or frosted controls. glassStrength changes the surface normal displacement, inner rim and cast shadow. paperOpacity adjusts transmission through the sheet. The refracted preset draws three individual lens profiles for the open button, close button and toolbar. Narrow hosts simplify the edge blur, and browsers without backdrop filtering show the paper fallback.
The cover title, excerpt, reader title and article use bundled Geist Serif Regular by default. Set typeface to geist-serif, sans, editorial or book. The Read label follows the article typeface. The two text-size buttons use Geist Serif. The byline and percentage use Geist Sans. fontSize and lineHeight configure the expanded article. readerWidth caps the text sheet. accent sets the passage highlight. The progress bar defaults to solid white with zero shine. A plain percentage beside it shows the current reading position. Under **Progress bar finish**, choose the base and highlight colors and set the shine strength, width and angle. byline and openLabel control the header credit and compact button. motionSpeed changes the open and close duration. A reversal starts at the sheet’s current position and size.
The paper’s cornerRadius applies to the compact card and expanded sheet throughout their transition. Use readingMeasure to cap the inner column independently of the sheet width. paragraphSpacing sets the gap between expanded paragraphs in em. Changing the column or spacing while reading keeps the current character anchored. Defaults are 40 px, 576 px and 1 em respectively.
Cover, reader and toolbar controls
The cover has its own dimensions, headline, excerpt spacing and edge fades. Tune the expanded sheet separately with its maximum height, headline and byline sizes, article padding, drop cap, and section label. The light and dark palettes each include paper, ink, secondary text, stage background and three background washes.
**Cover backdrop blur** and **Sheet backdrop blur** control the paper. **Frosted control blur** and saturation apply in frosted mode and on browsers using that fallback. **Glass rim intensity** adjusts the highlights in either mode. Changing the open button, close button or toolbar size also resizes its refraction map.
Open and close timings are independent and use the **Motion speed** multiplier. Set the entrance delays for the toolbar and text, then reopen the reader to see the sequence. **Passage highlight time** sets how long the opening sentence stays marked.
Icon credits
Functional icons come from Lucide. The bundled license includes the ISC and Feather MIT notices. Lucide
The preview runs the component’s own JavaScript. It respects reduced motion and pauses when off screen. The HTML bundle includes a static fallback.
Every setting in this panel comes from the component manifest. Preview size, pause and replay stay in the inspector.