Skip to content
iv-ui v0.3.0

Article

since 0.2.0

A readable page body with an optional title and standfirst.

import { Article } from '@elluzion/iv-ui';

Prose

Headings, paragraphs, lists, and code receive the typeset automatically.

Release notes

What changed in the console this week.

The focus ring now follows the keyboard on every overlay. Dialogs open with a short scale, and the entry animation is skipped when reduced motion is requested.

Fixes

  • Select keeps the active option visible while filtering.
  • Toast timers no longer close a newer message.
showToast('Deployed to production', 'success');
Source· svelte Show Hide
<script lang="ts">
	import { Article } from '@elluzion/iv-ui';
</script>

<Article title="Release notes" description="What changed in the console this week.">
	<p>
		The focus ring now follows the keyboard on every overlay. Dialogs open with a short scale, and
		the entry animation is skipped when reduced motion is requested.
	</p>
	<h2>Fixes</h2>
	<ul>
		<li>Select keeps the active option visible while filtering.</li>
		<li>Toast timers no longer close a newer message.</li>
	</ul>
	<pre><code>showToast('Deployed to production', 'success');</code></pre>
</Article>
  • Body content is wrapped in iv-prose, so plain HTML inherits the typeset.
  • title and description render a centered header with a hairline rule.
  • maxWidth narrows the body measure; the default is 880px.

Measure

maxWidth tightens the reading column without touching the header.

A narrow measure

520px keeps the line length comfortable.

The body column is narrowed independently of the header. Use it for release notes, documentation, or any surface that is mostly prose. Headings, lists, and code keep the same typeset.

Short lines are easier to scan; long lines lose the reader between returns.

Source· svelte Show Hide
<script lang="ts">
	import { Article } from '@elluzion/iv-ui';
</script>

<Article
	title="A narrow measure"
	description="520px keeps the line length comfortable."
	maxWidth={520}
>
	<p>
		The body column is narrowed independently of the header. Use it for release notes,
		documentation, or any surface that is mostly prose. Headings, lists, and code keep the same
		typeset.
	</p>
	<p>Short lines are easier to scan; long lines lose the reader between returns.</p>
</Article>
import { Article } from '@elluzion/iv-ui';

Props

4 props · 0 events · 1 snippets
PropTypeDefaultDescription
title string''Article heading.
description string''Standfirst shown below the heading.
maxWidth number880Maximum measure in pixels.
className string''Extra classes merged onto the root element.

class, id, style, aria-*, and data-* are forwarded through rest props.

Snippets

SnippetTypeDescription
childrenSnippetContent rendered inside the component.
  • The component renders a semantic <article> element.
  • Keep heading levels in order inside the body; title renders an h1.
  • Links and code inside the body keep the prose focus and contrast treatment.
Class hooks
.iv-article.iv-body.iv-description.iv-header.iv-title
iv-ui
↑ ↓ navigate ↵ open esc close minisearch · 482 records