import { Meta, Story, Canvas } from "@storybook/addon-docs"; import * as itemStories from "../item/item.stories"; import * as popupLayoutStories from "../../../../apps/browser/src/platform/popup/layout/popup-layout.stories"; # Compact Mode The Bitwarden browser extension has a global compact mode setting for users who prefer a more information-dense UI. ## Tailwind Component authors can hook into this setting with the `bit-compact` Tailwind variant. In the following example, the paragraph's padding is reduced when compact mode is enabled. ```html

Lorem impsum doggo dolor...

Lorem impsum doggo dolor...

```

Lorem impsum doggo dolor...

Lorem impsum doggo dolor...

## Service To get/set compact mode in TypeScript, the `CompactModeService` exposes a `enabled$` observable. However, styling with the Tailwind variant should be used when possible as it is more performant. ## Examples ### [Popup Layout](?path=/story/browser-popup-layout--compact-mode) ### [Item](?path=/story/component-library-item--compact-mode)