Skip to content

ealejandroh/vaadstrap

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vaadstrap

Bootstrap for Vaadin.

Designed to use bootstrap's grid system in Vaadin applications to enable mobile-ready views without writing a single line of css.

The library is ready to be used by any Vaadin project and requires no widgetset compilation.

<dependency>
   <groupId>com.sebworks</groupId>
   <artifactId>vaadstrap</artifactId>
   <version>0.2.2</version>
</dependency>

<repository>
   <id>vaadin-addons</id>
   <url>http://maven.vaadin.com/vaadin-addons</url>
</repository>

Usage example:

@Viewport("width=device-width, initial-scale=1") // this is necessary
public class BootstrapUI extends UI {
	@Override
	protected void init(VaadinRequest request) {
		setSizeFull();
		Container container = new Container();
		Row row = container.addRow();
		Col col1 = row.addCol(ColMod.SM_6, ColMod.MD_4);
		Col col2 = row.addCol(ColMod.SM_6, ColMod.MD_4, VisibilityMod.HIDDEN_XS);
		col1.addComponent(new TextArea());
		col1.addComponent(new TextArea());
		col2.addComponent(new HorizontalLayout(new Button("Button 1"), new Button("Button 2")));
		setContent(container);
	}
}

Container has Row(s). Row has Col(s).

col-*-*, col-*-offset-*, visible-*, hidden-* styles are available as enum constants.

In the future the library may be extended to support more bootstrap features and components through AbstractJavaScriptComponent. PR's are welcome.

Nota:

La versión 0.2.2 contempla los cambios necesarios para que la version 0.2.1 funcione con java 1.7 y vaadin 0.2.2

About

Bootstrap for Vaadin

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 96.0%
  • CSS 4.0%