This post shows how the Sketch > Dimensions mode works on a straight line.
Case 1. Making a length constraint on a non-horizontal/vertical) line:
When editing a sketch, draw a line. Pick Sketch > Sketch Dimension tool. Select the line.
Next to the cursor, you now find a "length indicator". It is unfortunate that this indicator goes south-west to north-east whereas my line goes pretty much in the perpendicular angle. Simply a horizontal indicator graphic might be a better choice. Anyways, this extra white means if you *click* somewhere you will get a length constraint.
Now, move the cursor left or right of the line. As long as you remain within the 'bounding box' area of the line, the cursor will be like this. Click.
You get the normal black cursor, and a "Select additional sketch geometry or location for dimension" tooltip. This must be a BUG - you just clicked to tell the program what you are doing. By clicking, you indicated you want a length dimension constraint to be created.
Move the cursor slightly.
Now we're talking! This is the constraint you want, and you can now freely set its numeric value as well as position it where you like.
Job done.
Case 2. Making a component constraint on a non-horizontal/vertical) line:
This is actually way easier than above.
When seeing the white "length dimension" cursor, move it beyond the line's bounding box, and you will automatically (without a click) get horizontal or vertical constraints.
Case 3. Making a length constraint on a horizontal or vertical line:
No "length dimension" cursor at all (but it actually should be there, until you start moving the cursor off the line).
Fusion 360 only allows you to set "length" (not component) constraints, if the line is perfectly horizontal or vertical.
This is somewhat unintuitive, since line's a line's a line, right? For tilted lines, one needs a 'click' to get length constraint. And has that white modded cursor. Here's neither a click, or the cursor, but the resulting constraint is for the length, not i.e. the vertical component.
Oh well..
Removal of a constraint
As long as you are in the 'Sketch > Dimensions' mode, you are adding dimensions. You cannot remove them. Getting away from the mode needs an 'esc' key press (a click outside of any objects should ideally suffice, but currently doesn't work).
To tell which mode you are currently in, it's good to pin the 'Constraints' and 'Dimensions' icons to the Bar so they are always visible (use the up-arrow next to the menu entries). Otherwise, you have no visual indication that you are within either submode.
Dimensions submode is active.
Actually, you can tell something by observing the 'Select' icon.
Left: Within Sketch > Dimensions mode (select unactive)
Right: Within normal Sketch mode (select active)
To remove constraints (either dimensions or logical constraints), select them in normal Sketch mode and press backspace (or right-click Delete by mouse).