MCPcopy Index your code
hub / github.com/ChilliCream/react-rasta

github.com/ChilliCream/react-rasta @1.0.4

Chat with this repo
repository ↗ · DeepWiki ↗ · release 1.0.4 ↗ · + Follow
16 symbols 77 edges 119 files 0 documented · 0% updated 3y ago1.0.4 · 2018-08-29★ 904 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

React Rasta

release package license build coverage better code code prettier


The most powerful and flexible grid system for React

React Rasta is a 12 column grid system built on top of the CSS flexbox layout and styled-components.

Getting Started

Here you will find all you need to get started quickly.

Install Package

First things first. Install the package react-rasta with yarn or npm.

When using yarn it looks like this.

yarn add react-rasta

And when using npm it looks like this.

npm install react-rasta --save

Required Dependencies

React Rasta depends on the following packages which need to be installed manually.

Package Version
react 16 or higher
styled-components 3 or higher

Code Examples

import React, {Component} from "react";
import {Column, Container, Row} from "react-rasta";

export default class App extends Component {
  render() {
    return (
      <Container>
        <Row>
          <Column size={3}>Left</Column>
          <Column size={{xs: 9, md: 3}}>Middle 1</Column>
          <Column size={{xs: 9, md: 3}}>Middle 2</Column>
          <Column size={3}>Right</Column>
        </Row>
      </Container>
    );
  }
}

Breakpoints (which will end up in media queries) could be redefined via ThemeProvider.

import React, {Component} from "react";
import {Column, Container, Row, ThemeProvider} from "react-rasta";

const breakpoints = {
  phone: 0,
  tablet: 600,
  desktop: 800,
};

const containerWidth = {
  // do not specify phone here
  tablet: 560,
  desktop: 760,
};

export default class App extends Component {
  render() {
    return (
      <ThemeProvider theme={{breakpoints, containerWidth}}>
        <Container>
          <Row>
            <Column size={3}>Left</Column>
            <Column size={{phone: 9, tablet: 3}}>Middle 1</Column>
            <Column size={{phone: 9, tablet: 3}}>Middle 2</Column>
            <Column size={3}>Right</Column>
          </Row>
        </Container>
      </ThemeProvider>
    );
  }
}

Documentation

Click here for the documentation.

Extension points exported contracts — how you extend this code

ContainerProperties (Interface)
(no doc)
src/container/ContainerProperties.ts
BreakpointMap (Interface)
(no doc)
src/media/BreakpointMap.ts
StoryProperties (Interface)
(no doc)
src/__utils__/StoryProperties.ts
RenderProvider (Interface)
(no doc)
src/utils/RenderProvider.ts
ThemeProperties (Interface)
(no doc)
src/theme/ThemeProperties.ts
ColumnProperties (Interface)
(no doc)
src/column/ColumnProperties.ts
RowProperties (Interface)
(no doc)
src/row/RowProperties.ts
PropertyValuesMap (Interface)
(no doc)
src/media/PropertyValuesMap.ts

Core symbols most depended-on inside this repo

renderOrder
called by 6
src/column/renderOrder.ts
renderWrap
called by 5
src/row/renderWrap.ts
bootstrap
called by 1
src/utils/bootstrap.ts
renderOrder
called by 0
src/utils/percentage.ts

Shape

Interface 12
Function 4

Languages

TypeScript100%

Modules by API surface

src/utils/percentage.ts1 symbols
src/utils/bootstrap.ts1 symbols
src/utils/RenderProvider.ts1 symbols
src/theme/ThemeProperties.ts1 symbols
src/theme/Theme.ts1 symbols
src/row/renderWrap.ts1 symbols
src/row/RowProperties.ts1 symbols
src/media/PropertyValuesMap.ts1 symbols
src/media/PropertyValues.ts1 symbols
src/media/BreakpointValuesMap.ts1 symbols
src/media/BreakpointValues.ts1 symbols
src/media/BreakpointMap.ts1 symbols

For agents

$ claude mcp add react-rasta \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact