Skip to Content

Features

Feature list components for landing page feature sections: a Grid laid out as a list in one to four columns or a divided single column, with feature, title and description parts and an outline item that rules its left edge.

View as Markdown
pnpm dlx shadcn add @01orbital/features

The example also uses section. Install it too:

pnpm dlx shadcn add @01orbital/section

Usage

import { FeatureGroup } from "@/components/features/features"

Examples

Command Referencefeatures-command-reference

Command reference feature list example on a dark developer page: a divided FeatureGroup of outline Features whose monospace titles are command-line commands, each with a short description.

pnpm dlx shadcn add @01orbital/features-command-reference

Train Fare Conditionsfeatures-train-fare-conditions

Fare conditions list example: a single-column FeatureGroup of outline Features setting out the terms of a train ticket, showing the Features component as a ruled list of rules and notes.

pnpm dlx shadcn add @01orbital/features-train-fare-conditions

Anatomy

Features is built from 4 parts. In the example they nest like this:

FeatureGroup
└─ Feature
   ├─ FeatureTitle
   └─ FeatureDescription
  • FeatureGroup: A list of features, rendered as a <ul> laid out in columns. Put a Feature inside for each one.
  • Feature: One feature inside FeatureGroup, rendered as an <li>. Put a FeatureTitle and a FeatureDescription inside, or a Card. A Card placed directly inside fills the item, so cards in a row end at the same height.
  • FeatureTitle: The feature's heading, an <h3> in semibold text by default. Pass render to use another heading level.
  • FeatureDescription: The feature's supporting text, in muted color. It renders one <p>; for a list of points, pass render={<ul role="list" />}.

API reference

FeatureGroup

A list of features, rendered as a <ul> laid out in columns. Put a Feature inside for each one.

default uses up to four columns, three unless you set cols. divided is one column with a rule between features. className lands on the list, but its columns follow the width of a wrapper around it, so to narrow the list, size its parent.

Prop

Type

It also accepts the props of the Base UI part it wraps, and the HTML attributes of the element it renders.

Feature

One feature inside FeatureGroup, rendered as an <li>. Put a FeatureTitle and a FeatureDescription inside, or a Card. A Card placed directly inside fills the item, so cards in a row end at the same height.

outline draws a faint rule down the left side and colors the part of it beside FeatureTitle in the primary color. It suits short entries such as an address, a contact or an office.

Prop

Type

It also accepts the props of the Base UI part it wraps, and the HTML attributes of the element it renders.

FeatureTitle

The feature's heading, an <h3> in semibold text by default. Pass render to use another heading level.

It accepts the props of the Base UI part it wraps, and the HTML attributes of the element it renders.

FeatureDescription

The feature's supporting text, in muted color. It renders one <p>; for a list of points, pass render={<ul role="list" />}.

It accepts the props of the Base UI part it wraps, and the HTML attributes of the element it renders.

Dependencies

npm: @base-ui/react, class-variance-authority, cn. The CLI installs them for you. cn merges Tailwind class names, in place of clsx and tailwind-merge.

Registry pieces it installs with it:

  • grid

Used in blocks

14 blocks are built with Features; the first 12: