Popper-core: Arrow position

Created on 24 Feb 2017  ·  8Comments  ·  Source: popperjs/popper-core

How would i go about positioning the arrow to the left when placement is bottom-start as i can't seem to find anything about this in the documentation?

# QUESTION ❔

Most helpful comment

@FezVrasta Thanks and of course i would share it, i am not a monster.

All 8 comments

You should write your own modifier, the arrow position isn't customizable at the moment.

@FezVrasta Can you give me an example on that is done?

I replied a similar question recently https://github.com/FezVrasta/popper.js/issues/173

You should create a modifier that edits the data.offsets.arrow value.

More info here:
https://popper.js.org/popper-documentation.html#dataobject

You may look at the built in offset modifier and adapt it to work on the arrow instead:
https://github.com/FezVrasta/popper.js/blob/master/src/popper/modifiers/offset.js

If by chance you end up creating this modifier, please consider to publish it to npm 👍

@FezVrasta Thanks and of course i would share it, i am not a monster.

Ahah sorry, it's just that lot of people don't think about it, not with bad intentions, they just think it's something not useful to others.

Any new on this? I'm trying also to write a modifier to position arrow.

Nope, the solution is still the same, create a modifier or send a PR to add this functionality.

Was this page helpful?
0 / 5 - 0 ratings