One centred column of article text, then the author and share links.

Last updated

Open block
Show code
---
/**
 * Rich text 01: One centred column of article text, then the author and share links.
 *
 * @block content
 * @order 21
 */
import Section from '@/components/apogee/Section/Section.astro'
import Prose from '@/components/apogee/Prose/Prose.astro'
import Image from '@/components/apogee/Image/Image.astro'
import Avatar from '@/components/apogee/Avatar/Avatar.astro'
import ShareLinks from '@/components/apogee/ShareLinks/ShareLinks.astro'
import type { ContentContent } from '@/components/apogee/sections/_shared/content.ts'

/** @composable */
interface Props extends ContentContent {}

const {
  label = 'Article',
  author = { name: 'Ada Lovelace', role: 'Design Lead' },
} = Astro.props
---

<Section spacing="large" containerWidth="small" aria-label={label}>
  <Prose>
      <p class="lead">A design system is the shared language a team speaks when it builds a product: the parts, the rules for using them and the reasons behind the rules.</p>
      <h2 >Introduction</h2>
      <p>Most teams start one after the third button that looks almost, but not quite, like the other two. The cost is rarely the button; it is the conversation every time someone has to choose between them.</p>
      <p>A system turns those conversations into decisions made once. It does not slow a team down; it removes the questions nobody needed to ask.</p>
      <figure>
        <Image src="https://picsum.photos/seed/apogee-content-46/1600/900" alt="" width={1600} height={900} fit="cover" class="aspect-video w-full" />
        <figcaption>A team review of the component inventory.</figcaption>
      </figure>
      <h2 >Software and tools</h2>
      <p>The tools matter less than the habits around them. Keep the source of truth in code, describe every part where people already work, and let the build check what people forget.</p>
      <ol>
        <li>Name the parts the way the team already talks about them.</li>
        <li>Write down when to use each one, and when not to.</li>
        <li>Fail the build when a colour pair misses contrast.</li>
      </ol>
      <blockquote>
        <p>“We stopped arguing about buttons and started arguing about the product. That was the point.”</p>
        <cite>Ada Lovelace, Design Lead</cite>
      </blockquote>
      <h2 >Other resources</h2>
      <p>Read the parts' own documentation first: every variant, every state, and the keyboard behaviour you get for free.</p>
      <Image src="https://picsum.photos/seed/apogee-content-47/1600/900" alt="" width={1600} height={900} fit="cover" class="aspect-video w-full" />
      <div class="not-prose mt-10 rounded-2xl bg-neutral-faded p-6 md:p-8">
        <h2 class="text-xl font-semibold">Conclusion</h2>
        <p class="mt-4 text-neutral-faded">Start small: one page built entirely from shared parts teaches more than any audit. Grow the system where the product needs it, not ahead of it.</p>
      </div>
    </Prose>
  <footer class="mt-12 flex flex-col gap-6 border-t border-neutral pt-8 sm:flex-row sm:items-center sm:justify-between">
    {author && (
    <div class="flex items-center gap-3">
      <Avatar name={author.name} size="large" />
      <div>
        <p class="font-semibold">{author.name}</p>
        {author.role && <p class="text-neutral-faded">{author.role}</p>}
      </div>
    </div>
    )}
    <ShareLinks title="What makes a design system work" />
  </footer>
</Section>

Add

npx @ava-ui/apogee add content/rich-text-01

This copies the block to src/components/apogee/blocks/content/ with everything it uses: Avatar, Image, Prose, Section, ShareLinks. Every piece of copy is a prop, with the sample copy as its default. Pass yours, or null to hide a part; see copy is props.

Accessibility

  • The heading is an h2 by default, so the block slots into a page under its h1; item titles are one level down.
  • Photos that only decorate have an empty alt; give yours one when it carries meaning.