Skip to content

Suggestion for docs on how to import css #284

Closed

Description

@rcackerman

Hi - I have a short suggestion for adding to the docs! This was something I struggled with a bunch.

For the main usage documentation, add one line:

import { FormeoEditor, FormeoRenderer } from 'formeo' // you have this
import "formeo/dist/formeo.min.css" // this is missing

(I'm adding this as an issue because I'm not super familiar with different packaging systems in javascript. This was required in webpacker with Rails 6.0.2.2.)

Activity

  1. shaunakv1 commented on Sep 24, 2020

    @shaunakv1

    I can vouch for this. Form editor renders wonky in rails without importing the css. Def needs to be part of the documentation.

  2. BintLopez commented on Nov 19, 2020

    @BintLopez

    +1 to this

  3. kevinchappell commented on Sep 25, 2026

    @kevinchappell
    Collaborator

    The README's usage section has included import 'formeo/dist/formeo.min.css' since v4.1.2, and the package exports map exposes that path, so webpacker, Vite and friends resolve it. The editor also tries to load the stylesheet from a CDN by default (the style option), but importing it yourself is more reliable, and a page that only uses FormeoRenderer needs the import because the renderer doesn't load any CSS. Closing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions