Skip to content

reddit/devvit-kit

Devvit Kit

Devvit Kit is a helper library that makes it easier to build Devvit apps and apps on Reddit’s Developer Platform. Devvit Kit includes both UI components and general backend patterns that simplify common tasks and enable developers to build apps faster.

Installation

To use Devvit Kit, navigate to your Devvit project in your terminal and install the package:

npm install @devvit/kit

Usage

Once you have Devvit Kit installed, you can import the helper you’re trying to use and then use it in applicable pieces of code. This is an example using the Columns helper.

import {Columns} from '@devvit/kit'
import {Devvit} from '@devvit/public-api'

Devvit.addCustomPostType({
    name: 'Columns static content',
    render: () => {
        return (
            <vstack padding="medium">
                <Columns columnCount={2} gapX="5px" gapY="10px" order="column">
                    {/* columns children here */}
                </Columns>
            </vstack>
        );
    }
});
Component Name Description Links
Columns A component that provides a simple column layout and optionally allows you to specify gap sizing between elements. Usage Instructions
Item pagination A helper that enables pagination of data, including UI elements for navigating through the elements. Usage Instructions
PixelPadding A component that lets you set padding from any side using pixel values. Usage Instructions
Developer toolbar A toolbar of actions only visible to developers. Usage Instructions
Watermark A Developer Platform watermark that's added to your app. Usage Instructions

Contributing to the devvit-kit public repo

Reddit has a number of open source projects that developers are invited to contribute to in our GitHub repo. There's a public issue board that tracks feature requests and bugs. All feedback is welcome!

If you'd like to contribute to this repo as developer, you can find detailed instructions in the contributing file.

Contributor license agreement

The first time you submit a pull request (PR) to a Reddit project, you should complete our CLA. We cannot accept PRs from GitHub users that have not agreed to the CLA. Note that this agreement applies to all open source Reddit projects, and you only need to submit it once.

Submit your CLA here.

Bugs and requests

Most of our outstanding bugs and user requests are visible here. These are a combination of synced issues from our internal system and user contributions made directly in GitHub. We do our best to keep this up to date with internal progress of bugs and issues. Before adding an issue to the board, please search for a similar or duplicate issue. You can always comment or react to issues you’d like to see prioritized.

Filing a new issue

Please use one of these labels when submitting a new issue:

  • bug
  • documentation
  • enhancement

Once issues are added to our internal tracking system, they will be labeled as “synced”.

Security issues

Security issues take special priority and are handled separately from our public tracker via Hackerone. Please do not submit security issues here on GitHub, as all issues are public and publishing them increases the risk of abuse.

How to make a pull request

Please follow instructions in contributing.md