All Projects → maraisr → storybook-addon-grid

maraisr / storybook-addon-grid

Licence: MIT License
⚜️ Column guides that help you align your stories

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to storybook-addon-grid

Graaf
A collection of pure CSS grids for designing your new projects
Stars: ✭ 186 (+994.12%)
Mutual labels:  design, grid
assistant
🤖 Bring your Figma design & development pipeline to the next level - with design to code, in-design-content-management, component management, tools for faster design
Stars: ✭ 451 (+2552.94%)
Mutual labels:  storybook, figma
Awesome Design Systems
A curated list of bookmarks, resources and articles about design systems focused on developers.
Stars: ✭ 222 (+1205.88%)
Mutual labels:  design, storybook
vue-layout-system
A pack of Vue components that solve daily layout problems
Stars: ✭ 31 (+82.35%)
Mutual labels:  grid, column
Leerraum.js
A PDF typesetting library with exact positioning and hyphenated line breaking
Stars: ✭ 233 (+1270.59%)
Mutual labels:  design, grid
storybook-addons-abstract
Storybook addon for linking Abstract layer and collection shares to stories. Example:
Stars: ✭ 63 (+270.59%)
Mutual labels:  design, storybook-addons
storybook-addon-html
A Storybook addon that extracts and displays compiled syntax-highlighted HTML
Stars: ✭ 61 (+258.82%)
Mutual labels:  storybook
top-software-engineering-articles
Collection of top articles about great software engineering practices.
Stars: ✭ 45 (+164.71%)
Mutual labels:  design
smart-home-neomorphism-app
Smart Home app ui design in a neomorphism style.
Stars: ✭ 82 (+382.35%)
Mutual labels:  design
communication-ui-library
UI Library for Azure Communication Services helps developers build communication applications with ease. From turn-key composites to UI components that can be composited together.
Stars: ✭ 44 (+158.82%)
Mutual labels:  storybook
brevis
CSS at scale
Stars: ✭ 62 (+264.71%)
Mutual labels:  design
Bitcoin-Icons
Icons made for Bitcoin applications, free to use.
Stars: ✭ 52 (+205.88%)
Mutual labels:  design
eleventy-react
Use React components in Eleventy.
Stars: ✭ 66 (+288.24%)
Mutual labels:  storybook
cloud-native-isometric-icons
Isometric assets promoting Cloud Native & Continuous Delivery
Stars: ✭ 33 (+94.12%)
Mutual labels:  design
sodium-ui
Sodium is a simple, modular and customizable web component library to build elegant and accessible UI pieces for your React Application.
Stars: ✭ 23 (+35.29%)
Mutual labels:  storybook
OwlBottomSheet
Simple library to show a bottom sheet like Owl app from Material Design studies cases
Stars: ✭ 44 (+158.82%)
Mutual labels:  design
art-ui
🌈 A UI Design Language and React UI library
Stars: ✭ 34 (+100%)
Mutual labels:  storybook
react-enterprise-starter-kit
Highly Scalable Awesome React Starter Kit for an enterprise application with a very easy maintainable codebase. 🔥
Stars: ✭ 55 (+223.53%)
Mutual labels:  storybook
styled-system-figma
Generate theme.js from Figma file
Stars: ✭ 26 (+52.94%)
Mutual labels:  figma
timepicker-ui
timepicker-ui is an easy library with timepicker. Fully wrote with TypeScript. This library is based on Material Design from Google.
Stars: ✭ 18 (+5.88%)
Mutual labels:  design

storybook-addon-grid

npm install storybook-addon-grid makes column grids simple


downloads

example that shows how the columns look when enabled

⚙️ Install

npm install storybook-addon-grid
// .storybook/main.js
module.exports = {
  addons: [require.resolve('storybook-addon-grid/preset')],
};
Chromatic users

Include this additional preset to configure the column guides for your Chromatic screenshots.

// .storybook/main.js
module.exports = {
  addons: [require.resolve('storybook-addon-grid/preset'), require.resolve('storybook-addon-grid/chromatic')],
};

🚀 Usage

The column guides are controlled with parameters and as such you can define this globally or per story.

The column guides can be turned on either via clicking the toolbar button, or via a keyboard shortcut Ctrl + G.

Note: Due to the nature of z-index, the root div of the stories will have a position: relative and z-index: 0 applied to it, allowing the column guides to sit over the top.

Parameters

Column design system is defined by 3 values:

  • the number of columns
  • the gap between them
  • the gutter — minimal margin between the system and the screen
  • maximal-width for the system to limit maximum width of all columns as well.

gridOn?: boolean = false

Defines if the column guides should be turned on this story by-default. The guides are controlled with a toolbar item, keyboard shortcut which may cause this to not always be on. This will force it to either be on or off when the story is loaded.

columns?: number = 12

The number of columns guides.

gap?: string = '20px'

The gap between columns.

gutter?: string = '50px'

System's gutter (margin) for both left and right.

gutterLeft?: string

Define to override the gutter defined on the left-hand-side.

gutterRight?: string

Define to override the gutter defined on the right-hand-side.

maxWidth?: string = '1024px'

The maximum width our columns should grow.

animation?: bollean = true

Enable or Disable the guides from fading in or out when toggling the state.

Chromatic users, this will be false by default.

guidesColor?: string = 'rgba(255, 0, 0, 0.1)'

Sets the color used for the column guides.

Global Parameters~
// .storybook/preview.js
export const parameters = {
  grid: {
    gridOn: true,
    columns: 12,
    gap: '20px',
    gutter: '50px',
    maxWidth: '1024px',
  },
};
Per story~
// MyComponent.stories.js

export const Example = () => {...};
Example.parameters = {
	grid: {
		columns: 6,
	},
};

📚 Further Readings

License

MIT © Marais Rossouw

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].