# 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.

Component · Features · https://01orbital.dev/docs/components/features

## Installation

```bash
npx shadcn@latest add @01orbital/features
```

## Usage

```tsx
import {
  Feature,
  FeatureDescription,
  FeatureGroup,
  FeatureTitle,
} from "@/components/features/features"
import {
  Section,
  SectionContent,
} from "@/components/section/section"

const COPY = {
  items: [
    {
      title: "Your tokens, not ours",
      body: "Every block reads the colors and type you already set.",
    },
    {
      title: "Installed in a minute",
      body: "One command puts the source in your repo, yours to edit.",
    },
    {
      title: "Accessible by default",
      body: "Focus, contrast and names are handled before you touch a line.",
    },
  ],
} as const

export default function FeaturesDemo() {
  return (
    <Section>
      <SectionContent>
        <FeatureGroup cols={3}>
          {COPY.items.map(({ title, body }) => (
            <Feature key={title}>
              <FeatureTitle>{title}</FeatureTitle>
              <FeatureDescription>{body}</FeatureDescription>
            </Feature>
          ))}
        </FeatureGroup>
      </SectionContent>
    </Section>
  )
}
```

This example installs with everything it uses:

```bash
npx shadcn@latest add @01orbital/features-demo
```

## 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. Its columns step up with the screen width (two from `sm`, then `cols` from `md`), not with the space it sits in: in a narrow column, pass a smaller `cols`.

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `gap?` | `"none" \| "xs" \| "sm" \| "lg" \| "md" \| "xl" \| "px" \| null` |  | Space between features: `xs` 8px, `sm` 16px, `md` 24px, `lg` 40px, `xl` 64px, `px` 1px, `none` 0. Unset, `default` uses `lg` and `divided` uses `none`. `sm` or `xs` suits card-style features. |
| `variant?` | `"default" \| "divided"` | `"default"` | `default` sets the features in columns. `divided` stacks them in one column with a rule between each. |
| `cols?` | `1 \| 2 \| 3 \| 4` | `3` | The most columns the features use once the list is wide enough. A `divided` list is always one column. |

### 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 | Default | Description |
| --- | --- | --- | --- |
| `variant?` | `"default" \| "outline" \| null` | `"default"` | The item style. `default` (the default) adds nothing. `outline` draws a 1px rule in `foreground` at 10% opacity down the left side, sets the text 24px from it, and colors the stretch of the rule beside `FeatureTitle` in `primary`. |

## Dependencies

Requires these pieces. The CLI adds each one that is missing and won't replace a file you already have unless you choose to:

- [Grid](https://01orbital.dev/docs/components/grid)

npm: `@base-ui/react`, `class-variance-authority`, `cn`

## Examples

- **Features Command Reference** (`@01orbital/features-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.
- **Features Train Fare Conditions** (`@01orbital/features-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.

## Used in blocks

- [About Office Locations](https://01orbital.dev/docs/blocks/about-08)
- [About Section with Process Steps](https://01orbital.dev/docs/blocks/about-01)
- [Alternating Screenshot Feature Rows](https://01orbital.dev/docs/blocks/feature-rows-01)
- [Contact Departments and Offices](https://01orbital.dev/docs/blocks/contact-offices-01)
- [Feature Cards with Orbit Diagram](https://01orbital.dev/docs/blocks/feature-cards-01)
- [Feature Steps](https://01orbital.dev/docs/blocks/feature-steps-01)
- [Glass Icon Feature Grid](https://01orbital.dev/docs/blocks/feature-grid-02)
- [Minimal Feature Cards](https://01orbital.dev/docs/blocks/minimal-features-02)
- [Minimal Feature Grid](https://01orbital.dev/docs/blocks/minimal-features-01)
- [Minimal Team List](https://01orbital.dev/docs/blocks/minimal-team-01)
- [Split Color Wash Feature Cards](https://01orbital.dev/docs/blocks/feature-cards-02)
- [Three Screenshot Feature Cards](https://01orbital.dev/docs/blocks/feature-cards-04)
- [Two Screenshot Feature Cards](https://01orbital.dev/docs/blocks/feature-cards-05)
