FeatureGrid
Lists product features in a responsive grid with an optional icon or index, a title, a description, and a link.
- Frameworks
- Astro · React · Elements · Dioxus
- Registry
lumen add FeatureGrid- Interaction
- Native markup
See it and copy it
Framework example
Choose Astro, React, Elements, or Dioxus to compare native usage against the shared visual output. Each example assumes the framework-level setup is already complete.
Shared tokens
One token document drives Astro, React, Web Components, and native apps.
Accessible by default
Keyboard paths, focus states, and semantic markup come with every primitive.
Progressive by design
Interactive pieces enhance server-rendered HTML and keep working without JavaScript.
View FeatureGrid code
Framework usage
Switch targets to compare the adapter code. This live preview runs the Astro example. Before copying an example, complete the matching framework setup; React, Elements, and Dioxus use their own behavior APIs.Width controls resize the preview container. Resize your browser to test viewport breakpoints.---
import { FeatureGrid, FeatureGridItem, Icon } from '@santi020k/lumen-astro'
---
<FeatureGrid columns={3} variant="card">
<FeatureGridItem
description="One token document drives Astro, React, Web Components, and native apps."
href="/docs/foundations"
title="Shared tokens"
>
<Icon slot="icon" name="palette" decorative />
</FeatureGridItem>
<FeatureGridItem
description="Keyboard paths, focus states, and semantic markup come with every primitive."
href="/docs/accessibility-evidence"
title="Accessible by default"
>
<Icon slot="icon" name="accessibility" decorative />
</FeatureGridItem>
<FeatureGridItem
description="Interactive pieces enhance server-rendered HTML and keep working without JavaScript."
href="/docs/web#runtime"
title="Progressive by design"
>
<Icon slot="icon" name="zap" decorative />
</FeatureGridItem>
</FeatureGrid>import { FeatureGrid, FeatureGridItem, Icon } from '@santi020k/lumen-react'
export const Example = () => (
<>
<FeatureGrid columns={3} variant="card">
<FeatureGridItem
description="One token document drives Astro, React, Web Components, and native apps."
href="/docs/foundations"
title="Shared tokens"
>
<Icon slot="icon" name="palette" decorative />
</FeatureGridItem>
<FeatureGridItem
description="Keyboard paths, focus states, and semantic markup come with every primitive."
href="/docs/accessibility-evidence"
title="Accessible by default"
>
<Icon slot="icon" name="accessibility" decorative />
</FeatureGridItem>
<FeatureGridItem
description="Interactive pieces enhance server-rendered HTML and keep working without JavaScript."
href="/docs/web#runtime"
title="Progressive by design"
>
<Icon slot="icon" name="zap" decorative />
</FeatureGridItem>
</FeatureGrid>
</>
)<script type="module">
import { defineLumenElements } from '@santi020k/lumen-elements/define'
defineLumenElements()
</script>
<lumen-feature-grid columns="3" variant="card">
<FeatureGridItem
description="One token document drives Astro, React, Web Components, and native apps."
href="/docs/foundations"
title="Shared tokens">
<lumen-icon slot="icon" name="palette" decorative></lumen-icon>
</FeatureGridItem>
<FeatureGridItem
description="Keyboard paths, focus states, and semantic markup come with every primitive."
href="/docs/accessibility-evidence"
title="Accessible by default">
<lumen-icon slot="icon" name="accessibility" decorative></lumen-icon>
</FeatureGridItem>
<FeatureGridItem
description="Interactive pieces enhance server-rendered HTML and keep working without JavaScript."
href="/docs/web#runtime"
title="Progressive by design">
<lumen-icon slot="icon" name="zap" decorative></lumen-icon>
</FeatureGridItem>
</lumen-feature-grid>use dioxus::prelude::*;
use lumen_dioxus::prelude::*;
#[component]
fn Example() -> Element {
rsx! {
FeatureGrid { variant: FeatureGridVariant::Card,
FeatureGridItem {
description: rsx! { "One token document drives every adapter." },
index: rsx! { "01" },
title: rsx! { "Shared tokens" },
}
FeatureGridItem { href: "/docs", title: rsx! { "Markup parity" } }
}
}
}Choose your target
Add this component
Choose the package for your runtime. All adapters share the Lumen stylesheet. Use the matching registry command when you want a local wrapper for that framework.
pnpm add @santi020k/lumen-astrolumen add FeatureGridpnpm add @santi020k/lumen-reactlumen add FeatureGrid --target reactpnpm add @santi020k/lumen-elementslumen add FeatureGrid --target elementsAPI reference
Lumen-specific props and runtime attributes for the Astro primitive. Use the framework differences above and the copyable examples for React composition and Elements attributes; the public adapter types define their supported contracts.
| Attribute | Values | Default | Description |
|---|---|---|---|
| columns | 2 | 3 | 4 | 3 | Sets the most columns on wide containers. The grid drops to fewer columns as it narrows, down to one. |
| variant | "plain" | "card" | "plain" | plain lays features on the page. card frames each feature in a bordered surface. |
| children | FeatureGridItem elements | required | Provides the features. The grid renders a list, so each item is a list item. |
| FeatureGridItem title | string | ReactNode / title slot | required | Names the feature in a heading element. |
| FeatureGridItem description | string | ReactNode / description slot | - | Adds a supporting sentence under the title. |
| FeatureGridItem icon | ReactNode / icon slot | - | Adds a decorative icon tile above the title. It is hidden from screen readers. |
| FeatureGridItem index | string | - | Adds a decorative index such as "01" when there is no icon. It is hidden from screen readers. |
| FeatureGridItem href | string | - | Turns the title into a link. In the card variant the whole card becomes the click target. |
| FeatureGridItem headingLevel | 1 | 2 | 3 | 4 | 5 | 6 | 3 | Chooses the title heading element. Values outside 1 to 6 are clamped. |
| class, className | string | "" | Merges custom classes with the generated ui-* root classes. |
| ...native attributes | HTML attributes | - | Forwards standard attributes to the root element unless the component consumes them. |
Customize FeatureGrid
Start with semantic theme tokens and a class on the public component. Keep its accessible name, focus treatment, and interaction state intact.
.product-feature-grid {
--surface: 0 0% 100%;
--ink: 220 20% 15%;
--line: 220 15% 82%;
}Apply product-feature-grid through Astro's class, React's className, or the custom element's class. Verify foreground and background contrast in both schemes.
| Hook | Values | Default | Contract |
|---|---|---|---|
| class, className | string | "" | Merges custom classes with the generated ui-* root classes. |
Use the documented hooks above and adapter types when targeting component states. Theme guide · Accessibility verification scope