Framework for stylus