Giter Club home page Giter Club logo

Comments (7)

mscolnick avatar mscolnick commented on July 23, 2024

@VivaldoMendes

You should be able to apply widths to different elements, using the .style() API. You can do this on ui elements (slider, text, etc), as well as layout elements (hstack, vstack)

import marimo as mo
mo.vstack([
    mo.ui.text(full_width=True).style({"width": "500px"}),
    mo.ui.text(full_width=True).style({"width": "300px"}),
    mo.ui.text(full_width=True).style({"width": "100px"}),
])
image

from marimo.

VivaldoMendes avatar VivaldoMendes commented on July 23, 2024

Thanks for your reply. If I understand correctly, this method applies only to individual elements (cells), not to the entire document. Regarding the whole document, we cannot go over the three default alternatives: compact, medium, and full. Wright?

from marimo.

mscolnick avatar mscolnick commented on July 23, 2024

That is correct - it's just for the elements. The only widths are compact, medium, and full which we feel cover the use cases we found.

If this is for running marimo as an application with particular layouting - you may want to checkout the Grid Layout https://docs.marimo.io/guides/apps.html#grid-layout

from marimo.

VivaldoMendes avatar VivaldoMendes commented on July 23, 2024

@mscolnick , Thanks for your help.

Will it be possible to use CSS to increase/remove some functionalities from an active notebook? We are running some courses using Pluto and Julia. In evaluation moments (tests/exams), we have to introduce some changes to the style of the notebook so that students will not have access to some of the notebooks's functionalities. For example, students will not be able to copy markdown text, or code, nor will they be able to create a new cell, or delete an existing one. Will it be possible to produce these kind of changes in marimo?
Thanks

from marimo.

mscolnick avatar mscolnick commented on July 23, 2024

@VivaldoMendes - you can likely design tests/exams as applications (by running marimo run file.py). if you need code as input from the user, you can do mo.ui.code_editor to create these kinds of elements.

from marimo.

VivaldoMendes avatar VivaldoMendes commented on July 23, 2024

@mscolnick, thank you very much.

from marimo.

mscolnick avatar mscolnick commented on July 23, 2024

no problem - @VivaldoMendes, im going to close this but please reach out if you have any more questions

from marimo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.