diff --git a/libs/components/src/stories/compact-mode.mdx b/libs/components/src/stories/compact-mode.mdx new file mode 100644 index 00000000000..ca7f8b3c214 --- /dev/null +++ b/libs/components/src/stories/compact-mode.mdx @@ -0,0 +1,45 @@ +import { Meta, Story } from "@storybook/addon-docs"; + +import * as itemStories from "../item/item.stories"; + + + +# Compact Mode + +Bitwarden has a global compact mode setting to support users who prefer a more information-dense +experience. + +## Toggling compact mode + +Compact mode can be enabled by adding the `tw-bit-compact` class to an ancestor element and disabled +by removing the class. Alternatively + +## Tailwind + +Component authors can hook into this setting with the `bit-compact` Tailwind variant. In the +following example, the paragraph's padding is removed when compact mode is enabled. + +```html +
Lorem impsum doggo dolor...
+ +Lorem impsum doggo dolor...
+Lorem impsum doggo dolor...
+ +Lorem impsum doggo dolor...
+